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 without an exponent #1320

Conversation

plokhotnyuk
Copy link
Contributor

@plokhotnyuk plokhotnyuk commented Feb 17, 2025

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

Before

Benchmark                            (size)   Mode  Cnt        Score        Error  Units
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
GeoJSONWriting.zioJson                  N/A  thrpt    5    16847.105 ±   1045.649  ops/s
GeoJSONWriting.zioSchemaJson            N/A  thrpt    5    26026.200 ±    349.518  ops/s

After

Benchmark                            (size)   Mode  Cnt        Score        Error  Units
ArrayOfDoublesWriting.zioJson           128  thrpt    5   216015.004 ±   5348.566  ops/s
ArrayOfDoublesWriting.zioSchemaJson     128  thrpt    5   220146.565 ±   1437.523  ops/s
ArrayOfFloatsWriting.zioJson            128  thrpt    5   337490.570 ±  22496.827  ops/s
ArrayOfFloatsWriting.zioSchemaJson      128  thrpt    5   331373.715 ±   3244.506  ops/s
GeoJSONWriting.zioJson                  N/A  thrpt    5    14534.595 ±   2277.668  ops/s
GeoJSONWriting.zioSchemaJson            N/A  thrpt    5    32090.535 ±    682.181  ops/s

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