Tokutek / mongo

TokuMX is a high-performance, concurrent, compressing, drop-in replacement engine for MongoDB | Issue tracker: https://tokutek.atlassian.net/browse/MX/ |
http://www.tokutek.com/products/tokumx-for-mongodb/
704 stars 97 forks source link

Move key comparison code to storage/key.h for better inlining. #1170

Closed esmet closed 10 years ago

esmet commented 10 years ago

Also add a few MONGO_unlikely clauses to unlikely branches in the comparison function.

zkasheff commented 10 years ago

Good stuff. Was this motivated by an experiment of any kind? Have you seen an impact anywhere?

On Thu, May 29, 2014 at 10:46 AM, John Esmet notifications@github.comwrote:

Also add a few MONGO_unlikely clauses to unlikely branches in the

comparison function.

You can merge this Pull Request by running

git pull https://github.com/Tokutek/mongo inline_cmp

Or view, comment on, or merge it at:

https://github.com/Tokutek/mongo/pull/1170 Commit Summary

  • Move key comparison code to storage/key.h for better inlining. Add a few

File Changes

  • M src/mongo/db/storage/key.cpphttps://github.com/Tokutek/mongo/pull/1170/files#diff-0(253)
  • M src/mongo/db/storage/key.hhttps://github.com/Tokutek/mongo/pull/1170/files#diff-1(228)

Patch Links:

— Reply to this email directly or view it on GitHubhttps://github.com/Tokutek/mongo/pull/1170 .

esmet commented 10 years ago

I see ~5% on non-covering secondary range queries.

Pretty good for a 'free' changeset!

leifwalsh commented 10 years ago

going to have tim run benchmarks with 1.5 + this change, considering this for 1.5