sparse icon indicating copy to clipboard operation
sparse copied to clipboard

use static arrays for indexing

Open daletovar opened this issue 5 years ago • 6 comments

I've replaced the dynamic structures with static ones for GCXS indexing. This improves the speed pretty significantly (twice as fast in a number of cases). Also, even allocating extra space in arrays seems to outperform lists in terms of memory for the most part.

daletovar avatar Nov 11 '20 01:11 daletovar

Codecov Report

Merging #418 (2b5818a) into master (5b44d5f) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #418   +/-   ##
=======================================
  Coverage   95.24%   95.24%           
=======================================
  Files          19       19           
  Lines        2818     2821    +3     
=======================================
+ Hits         2684     2687    +3     
  Misses        134      134           

codecov[bot] avatar Nov 11 '20 01:11 codecov[bot]

Can you post benchmarks as well? Ideally add them to the ASV suite.

hameerabbasi avatar Nov 11 '20 06:11 hameerabbasi

Also, we might want to hold off on merging this, Numba 0.52 introduces a number of improvements for typed lists, so switching to those might be worthwhile instead.

hameerabbasi avatar Nov 11 '20 07:11 hameerabbasi

Yeah, I can definitely add them to the ASV suite. Sure, I'm interested to see what improvements have been made in Numba. In general, I think there's be a lot to gain by moving to arrays over lists. But the benchmarks should tell us for certain.

daletovar avatar Nov 12 '20 20:11 daletovar

@daletovar I believe Numba 0.52 is out. Can we re-run the benchmarks on this with that version installed, against the old ones as well?

hameerabbasi avatar Jan 18 '21 07:01 hameerabbasi

Sure thing. I'll get right on that.

daletovar avatar Jan 20 '21 01:01 daletovar

I ran the benchmarks on this a long time ago and this seemed to be obsolete. Closing for now.

hameerabbasi avatar Nov 20 '22 04:11 hameerabbasi