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

scripting benchmarks using find string #129

Merged

Conversation

wsargent
Copy link
Collaborator

@wsargent wsargent commented Apr 23, 2022

Something is causing findString to be slow when used through the scripting language:

Benchmark                                      Mode  Cnt     Score     Error  Units
ScriptingBenchmarks.testFileConditionFail      avgt    5  4379.959 ± 579.831  ns/op
ScriptingBenchmarks.testFileConditionMatch     avgt    5  4610.075 ± 147.281  ns/op
ScriptingBenchmarks.testStringConditionFail    avgt    5  4649.784 ±  87.629  ns/op
ScriptingBenchmarks.testStringConditionMatch   avgt    5  4262.437 ± 191.742  ns/op
ScriptingBenchmarks.testWatchedConditionFail   avgt    5  5242.896 ±  93.665  ns/op
ScriptingBenchmarks.testWatchedConditionMatch  avgt    5  4700.055 ±  87.745  ns/op

Running the findString directly gives much better benchmarks, around 480 ns or so...

JsonPathBenchmarks.testPathConditionFail          avgt    5  474.741 ± 25.194  ns/op
JsonPathBenchmarks.testPathConditionPass          avgt    5  480.219 ± 93.595  ns/op
JsonPathBenchmarks.testStreamConditionFail        avgt    5   65.068 ±  6.154  ns/op
JsonPathBenchmarks.testStreamConditionPass        avgt    5   70.406 ±  1.922  ns/op

@wsargent wsargent merged commit f5006d2 into tersesystems:main Apr 24, 2022
@wsargent wsargent deleted the scripting-benchmarks-using-find-string branch April 24, 2022 00:13
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.

None yet

1 participant