Skip to content

Optimize arena_prof_ctx_set(). #20

Closed

Description

@jasone

Refactor profiling code so that arena_prof_ctx_set() receives usize as an argument. This will allow the following:

if ((mapbits & CHUNK_MAP_LARGE) == 0) {

to be rewritten as:

if (usize <= SMALL_MAXCLASS) {

The latter avoids reading mapbits from the chunk header under normal circumstances (prof_promote is typically true).

Activity

  1. jasone commented on Dec 16, 2013

    @jasone
    MemberAuthor

    Integrated: 6657693 and 5fbad09. This turned out to be a bit more subtle than anticipated; there remains a case for which mapbits has to be read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions