Skip to content

IGNITE-14057 Support big-endian systems#7

Closed
isapego wants to merge 3 commits intoapache:masterfrom
isapego:ignite-14057
Closed

IGNITE-14057 Support big-endian systems#7
isapego wants to merge 3 commits intoapache:masterfrom
isapego:ignite-14057

Conversation

@isapego
Copy link
Copy Markdown
Contributor

@isapego isapego commented Jan 27, 2021

Fix primitives decoding on big-endian architectures

Comment thread pytest.ini Outdated
Comment thread pyignite/datatypes/primitive.py Outdated
return Primitive.fix_endianness(bytes(cls.c_type(value)))

@staticmethod
def fix_endianness(buf):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too slow

timeit.timeit(lambda: fix_endianness(bytes(ctypes.c_longlong(10000))), number=1000000)
0.679906272000153
timeit.timeit(lambda: struct.pack("<q", 10000), number=1000000)
0.25078236300032586

Fix primitives decoding on big-endian architectures
@asfgit asfgit closed this in 18d32bb Jan 27, 2021
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.

3 participants