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

More efficient encoding of floats and doubles #1319

Conversation

plokhotnyuk
Copy link
Contributor

@plokhotnyuk plokhotnyuk commented Feb 17, 2025

Tested with Scala 3 and JDK-21 on Intel® Core™ i7-11800H:

Before

Benchmark                            (size)   Mode  Cnt        Score        Error  Units
AnyValsWriting.zioJson                  N/A  thrpt    5  3823372.648 ±  13023.722  ops/s
AnyValsWriting.zioSchemaJson            N/A  thrpt    5  3852940.951 ± 195576.957  ops/s
ArrayOfDoublesWriting.zioJson           128  thrpt    5   184105.035 ±   3967.936  ops/s
ArrayOfDoublesWriting.zioSchemaJson     128  thrpt    5   161213.205 ±    607.026  ops/s
ArrayOfFloatsWriting.zioJson            128  thrpt    5   244258.544 ±   3256.474  ops/s
ArrayOfFloatsWriting.zioSchemaJson      128  thrpt    5   244916.346 ±   8006.527  ops/s
PrimitivesWriting.zioJson               N/A  thrpt    5  6349196.701 ±  26773.712  ops/s
PrimitivesWriting.zioSchemaJson         N/A  thrpt    5  5217725.547 ±  71947.044  ops/s

After

Benchmark                            (size)   Mode  Cnt        Score        Error  Units
AnyValsWriting.zioJson                  N/A  thrpt    5  3850793.395 ± 206318.568  ops/s
AnyValsWriting.zioSchemaJson            N/A  thrpt    5  3927681.798 ±  31279.885  ops/s
ArrayOfDoublesWriting.zioJson           128  thrpt    5   213042.974 ±   1967.557  ops/s
ArrayOfDoublesWriting.zioSchemaJson     128  thrpt    5   210949.814 ±   2905.848  ops/s
ArrayOfFloatsWriting.zioJson            128  thrpt    5   285297.646 ±   7687.284  ops/s
ArrayOfFloatsWriting.zioSchemaJson      128  thrpt    5   314495.765 ±   5640.222  ops/s
PrimitivesWriting.zioJson               N/A  thrpt    5  6801915.370 ± 171719.113  ops/s
PrimitivesWriting.zioSchemaJson         N/A  thrpt    5  5397774.649 ± 354764.552  ops/s

@plokhotnyuk plokhotnyuk marked this pull request as ready for review February 17, 2025 13:35
@plokhotnyuk plokhotnyuk requested a review from a team as a code owner February 17, 2025 13:35
@plokhotnyuk plokhotnyuk merged commit d978684 into zio:series/2.x Feb 17, 2025
31 checks passed
@plokhotnyuk plokhotnyuk deleted the more-efficient-encoding-of-floats-and-doubles branch February 17, 2025 13:36
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.

1 participant