Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up buffer creation. #92

Merged
merged 1 commit into from
Jan 9, 2016
Merged

Speed up buffer creation. #92

merged 1 commit into from
Jan 9, 2016

Commits on Jan 8, 2016

  1. Speed up buffer creation.

    Since 1d20f50 (#40), instances already
    gained all the `Buffer`'s methods via the prototype re-assignment.
    Skipping the `_augment` call yields significant speedups:
    
    ~50% faster small buffer creation:
    
      new(16) before: 595,757 ops/sec ±0.92% (91 runs sampled)
      new(16) after: 894,462 ops/sec ±0.69% (87 runs sampled)
    
    ~20% faster slice:
    
      slice before: 2,176,194 ops/sec ±1.59% (89 runs sampled)
      slice after: 2,624,209 ops/sec ±0.42% (99 runs sampled)
    
    Other benchmarks aren't significantly different.
    mtth committed Jan 8, 2016
    Configuration menu
    Copy the full SHA
    12a3318 View commit details
    Browse the repository at this point in the history