Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 941
    • Issues 941
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 124
    • Merge requests 124
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorgxorg
  • xserverxserver
  • Merge requests
  • !84

dix: cache ResourceClientBits() value

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Olivier Fourdan requested to merge ofourdan/xserver:ilog2-optimize into master Dec 06, 2018
  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 1

The LimitClient is set once and for all at startup, whereas the function ResourceClientBits() which returns the client field offset within the XID based on the value of LimitClient can be called repeatedly.

Small optimization, cache the result of ilog2(), that saves running the same loop over and over each time ResourceClientBits() is called.

Signed-off-by: Olivier Fourdan ofourdan@redhat.com

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ilog2-optimize