astrofrog / fast-histogram

:zap: Fast 1D and 2D histogram functions in Python :zap:
BSD 2-Clause "Simplified" License
267 stars 28 forks source link

Avoid memory copies for non-native 64-bit float arrays #18

Closed astrofrog closed 6 years ago

astrofrog commented 6 years ago

This does byte-swapping on-the-fly - before merging I need to double check the performance impact.

This also breaks compatibility with people who might pass lists of data - need to add a test for that!

astrofrog commented 6 years ago

The performance does improve by a factor of 2 for big endian arrays. I need to add tests with big endian arrays, and also some tests with memory mapped arrays to see how things work.