You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Fokko Driesprong (Jira)" <ji...@apache.org> on 2020/03/29 10:38:00 UTC

[jira] [Resolved] (AVRO-2696) Improve Avro Double and Float Encode Performance

     [ https://issues.apache.org/jira/browse/AVRO-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fokko Driesprong resolved AVRO-2696.
------------------------------------
    Fix Version/s: 1.10.0
       Resolution: Fixed

> Improve Avro Double and Float Encode Performance
> ------------------------------------------------
>
>                 Key: AVRO-2696
>                 URL: https://issues.apache.org/jira/browse/AVRO-2696
>             Project: Apache Avro
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>             Fix For: 1.10.0
>
>
> I was looking at how Avro encodes Doubles and Floats and comparing it to Java's.
> So, I checked it out and found that the Java version for Floats is faster than Avro using the Avro perf tests:
> {code}
> # Avro Impl
> FloatTest.encode  thrpt    3  273709210.133 ± 49629107.871  ops/s
> FloatTest.encode  thrpt    3  271515727.631 ± 57405372.266  ops/s
> # Java Impl
> FloatTest.encode  thrpt    3  278234438.923 ± 34633982.243  ops/s
> FloatTest.encode  thrpt    3  284801936.136 ± 52273884.157  ops/s
> {code}
> Interestingly, I wasn't able to reproduce this gain with Doubles.  Avro's version was faster.  However, we can remove the bitwise mask (Java doesn't bother to do it).
> https://github.com/openjdk/jdk/blob/6bab0f539fba8fb441697846347597b4a0ade428/src/java.base/share/classes/java/io/Bits.java#L105



--
This message was sent by Atlassian Jira
(v8.3.4#803005)