[
https://issues.apache.org/jira/browse/AVRO-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526961#comment-15526961
]
ASF GitHub Bot commented on AVRO-1928:
--------------------------------------
GitHub user shalabhc opened a pull request:
https://github.com/apache/avro/pull/132
AVRO-1928: Simplify Python float/double encoding
Switch to using built-in little endian support in the struct
module, instead of explicit bit manipulation.
All tests pass.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shalabhc/avro master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/avro/pull/132.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #132
----
commit 9c2dee9f2c181fb6f3568e85353f8856caec87c1
Author: Shalabh Chaturvedi <[email protected]>
Date: 2016-09-27T18:00:34Z
AVRO-1928: Simplify Python float/double encoding
Switch to using built-in little endian support in the struct
module, instead of explicit bit manipulation.
All tests pass.
----
> Python double/float encoding implementation should use built-in struct
> support for little endian
> ------------------------------------------------------------------------------------------------
>
> Key: AVRO-1928
> URL: https://issues.apache.org/jira/browse/AVRO-1928
> Project: Avro
> Issue Type: Improvement
> Components: python
> Affects Versions: 1.8.1
> Reporter: Shalabh Chaturvedi
> Priority: Minor
>
> The encoding and decoding of double and float types in Python uses
> unnecessary bit operations and packing/unpacking. Python's {{struct}} module
> supports little-endian encoding and could be used directly, instead of using
> the big-endian and then bit-fiddling to reverse the endianness.
> This could have a big impact of encoding/decoding speed of large buffers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)