-
Notifications
You must be signed in to change notification settings - Fork 141
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
Benchmark for FindIndices #272
Conversation
Adds separate benchmark suite for comparing the relative performance of findIndex, findIndices, elemIndex, and elemIndices over first occurence and second occurence in sparse strict bytestring Also includes benchmark for performance of uninlined versus inlined equality test as predicate for findIndex and findIndices
696e6e3
to
6957f6d
Compare
Fixes issues with benchmark cabal file by re-including C source files and headers; also removes leftover comment regarding blaze builder Amends inaccurate description of BenchIndices module Removes explicit NOINLINE pragma for the `absurdlong` test string
Removes import of GHC.Word.eqWord8 from BenchIndices, as GHC.Word does not export eqWord8 in GHC 7.10.3. Reimplements nilEq in terms of (==)
The Travis checks appear to have been reported as failing due to one of the checks getting terminated by a power-off before it could even begin building. The change I made was only in haddock so there is no conceivable way it could break any checks. Unless I push again and thereby cause a rebuild, or someone with write access manually forces a recheck, please consider the latest commit (52b6e44) as passing all checks, as the previous 43e4d41 did. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all good and well-thought stuff, but I'd prefer less indirections. Names of many functions are longer than their definitions, and, taking into account type signatures and INLINE pragmas, signal-to-noise ratio is not ideal.
Could you please inline most of one-line-long definitions?
Fix dangling `in` from removed `let` binding Co-authored-by: Viktor Dukhovni <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds a benchmark suite for measuring the performance of
Data.ByteString.findIndices
relative toData.ByteString.findIndex
(and the relatedData.ByteString.elemIndices
andData.ByteString.elemIndex
) over inlinable and uninlinable equality tests.For comparing performance of relevant functions before and after changes implemented in #270