WillAyd commented on PR #280:
URL: https://github.com/apache/arrow-nanoarrow/pull/280#issuecomment-1688759144

   On the writing side of things my benchmarks shows ~10% improvement not using 
shift. Not as drastic as read, but still maybe worthwhile
   
   ```python
   In [2]: from comparisons import ComparisonManager
      ...: mgr = ComparisonManager()
      ...: %timeit mgr.pack()
      ...: %timeit mgr.pack_no_shift()
   80.1 µs ± 984 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
   72.8 µs ± 390 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
   
   In [3]: from comparisons import ComparisonManager
      ...: mgr = ComparisonManager()
      ...: %timeit mgr.pack()
      ...: %timeit mgr.pack_no_shift()
   78.9 µs ± 671 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
   71.5 µs ± 195 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
   
   In [4]: from comparisons import ComparisonManager
      ...: mgr = ComparisonManager()
      ...: %timeit mgr.pack()
      ...: %timeit mgr.pack_no_shift()
   80.4 µs ± 324 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
   72.2 µs ± 272 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to