Skip to content

Conversation

@robinst
Copy link
Collaborator

@robinst robinst commented Nov 8, 2018

Profiling showed that code for tight/loose list calculation was using a bunch of time. Rewriting that resulted in another nice performance improvement. Before:

Benchmark                 Mode  Cnt    Score   Error  Units
SpecBenchmark.wholeSpec  thrpt  200  127.930 ± 0.600  ops/s
SpecBenchmark.examples   thrpt  200  305.566 ± 0.959  ops/s

After:

Benchmark                 Mode  Cnt    Score   Error  Units
SpecBenchmark.wholeSpec  thrpt  200  146.443 ± 0.584  ops/s
SpecBenchmark.examples   thrpt  200  331.033 ± 0.930  ops/s

That's another 10% to 15% improvement :).

Not sure optimization would take care of that, but doing it doesn't
really hurt readability either.
I'll conclude that this was a failed experiment. Benchmarks show that
performance improves up to 4% when we remove it.
This results in an almost 10% performance improvement on both
benchmarks. Before:

Benchmark                 Mode  Cnt    Score   Error  Units
SpecBenchmark.examples   thrpt  200  308.071 ± 0.975  ops/s
SpecBenchmark.wholeSpec  thrpt  200  134.033 ± 0.545  ops/s

After:

SpecBenchmark.examples   thrpt  200  331.033 ± 0.930  ops/s
SpecBenchmark.wholeSpec  thrpt  200  146.443 ± 0.584  ops/s
@robinst robinst merged commit b5745a1 into master Nov 9, 2018
@robinst robinst deleted the optimize-parsing branch July 16, 2019 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants