3 ms·
Yep, I've used __builtin_popcountll for ORB from OpenCV (256 bit binary descriptors).
by jonatron 5y ago
Yep, I've used __builtin_popcountll for ORB from OpenCV (256 bit binary descriptors).
- 4gotunameagain 5y agoLooks like we've done similar things :) Horror story: I was once developing a TRN system for a spacecraft instrument which uses an ancient x86 processor that does not have popcnt, ended up using a look-up table instead...
- solarexplorer 5y agoDid you know about HAKMEM 169? I guess it was/is not widely known since many people mention lookup tables as the only fast alternative to the popcnt instruction. http://www.hakmem.org/#item169 http://www.hakmem.org/#item169
- 4gotunameagain 5y agoThat's interesting, thanks. It seems that look up tables are still faster when memory allows it though (http://www.dalkescientific.com/writings/diary/archive/2008/07/03/hakmem_and_other_popcounts.html http://www.dalkescientific.com/writings/diary/archive/2008/0...)