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

Tweak performance of QueryOps#withQueryParam #6864

Merged
merged 4 commits into from
Apr 12, 2023
Merged

Conversation

danicheg
Copy link
Member

Before

  • throughput
Benchmark                             (size)   Mode  Cnt      Score     Error   Units
QueryBench.withQueryParamParsedQuery       0  thrpt    5  26645.918 ± 365.286  ops/ms
QueryBench.withQueryParamParsedQuery      10  thrpt    5  24688.383 ±  81.462  ops/ms
QueryBench.withQueryParamParsedQuery     100  thrpt    5   2515.062 ±   5.276  ops/ms
QueryBench.withQueryParamParsedQuery    1000  thrpt    5    206.958 ±   0.536  ops/ms
QueryBench.withQueryParamRawQuery          0  thrpt    5  25385.754 ±  21.232  ops/ms
QueryBench.withQueryParamRawQuery         10  thrpt    5  23735.831 ± 638.432  ops/ms
QueryBench.withQueryParamRawQuery        100  thrpt    5   2511.501 ±   2.668  ops/ms
QueryBench.withQueryParamRawQuery       1000  thrpt    5    218.707 ±   1.387  ops/ms
  • memory consumption
Benchmark                                                    (size)  Mode  Cnt     Score     Error   Units
QueryBench.withQueryParamParsedQuery:·gc.alloc.rate.norm          0  avgt    5   232.019 ±   0.001    B/op
QueryBench.withQueryParamParsedQuery:·gc.alloc.rate.norm         10  avgt    5   272.022 ±   0.001    B/op
QueryBench.withQueryParamParsedQuery:·gc.alloc.rate.norm        100  avgt    5  1136.135 ±   0.005    B/op
QueryBench.withQueryParamParsedQuery:·gc.alloc.rate.norm       1000  avgt    5  5312.780 ±   0.011    B/op
QueryBench.withQueryParamRawQuery:·gc.alloc.rate.norm             0  avgt    5   232.019 ±   0.001    B/op
QueryBench.withQueryParamRawQuery:·gc.alloc.rate.norm            10  avgt    5   272.022 ±   0.001    B/op
QueryBench.withQueryParamRawQuery:·gc.alloc.rate.norm           100  avgt    5  1136.135 ±   0.004    B/op
QueryBench.withQueryParamRawQuery:·gc.alloc.rate.norm          1000  avgt    5  5312.780 ±   0.012    B/op

After

  • throughput
Benchmark                             (size)   Mode  Cnt      Score      Error   Units
QueryBench.withQueryParamParsedQuery       0  thrpt    5  31821.586 ±  651.064  ops/ms
QueryBench.withQueryParamParsedQuery      10  thrpt    5  26747.638 ± 2846.398  ops/ms
QueryBench.withQueryParamParsedQuery     100  thrpt    5   2411.676 ±   44.376  ops/ms
QueryBench.withQueryParamParsedQuery    1000  thrpt    5    204.550 ±    5.038  ops/ms
QueryBench.withQueryParamRawQuery          0  thrpt    5  31333.871 ±  634.047  ops/ms
QueryBench.withQueryParamRawQuery         10  thrpt    5  27755.282 ±   21.222  ops/ms
QueryBench.withQueryParamRawQuery        100  thrpt    5   2418.994 ±   45.132  ops/ms
QueryBench.withQueryParamRawQuery       1000  thrpt    5    220.835 ±    1.919  ops/ms
  • memory consumption
Benchmark                                                    (size)  Mode  Cnt     Score     Error   Units
QueryBench.withQueryParamParsedQuery:·gc.alloc.rate.norm          0  avgt    5   176.011 ±   0.001    B/op
QueryBench.withQueryParamParsedQuery:·gc.alloc.rate.norm         10  avgt    5   216.017 ±   0.001    B/op
QueryBench.withQueryParamParsedQuery:·gc.alloc.rate.norm        100  avgt    5  1080.129 ±   0.004    B/op
QueryBench.withQueryParamParsedQuery:·gc.alloc.rate.norm       1000  avgt    5  5256.773 ±   0.024    B/op
QueryBench.withQueryParamRawQuery:·gc.alloc.rate.norm             0  avgt    5   176.014 ±   0.001    B/op
QueryBench.withQueryParamRawQuery:·gc.alloc.rate.norm            10  avgt    5   216.018 ±   0.001    B/op
QueryBench.withQueryParamRawQuery:·gc.alloc.rate.norm           100  avgt    5  1080.129 ±   0.004    B/op
QueryBench.withQueryParamRawQuery:·gc.alloc.rate.norm          1000  avgt    5  5256.772 ±   0.023    B/op

@mergify mergify bot added the module:core label Dec 18, 2022
@danicheg
Copy link
Member Author

Only now I have realized that we could do it in 0.23. So, if we accept this, I will do a backport.

@danicheg
Copy link
Member Author

Oh, thanks for the review Ben, I have already forgotten about this :)

@danicheg danicheg merged commit 0346241 into http4s:main Apr 12, 2023
@danicheg danicheg deleted the query-ops branch April 12, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants