News for hackers. Stuff that matters.
Re:The unreasonable effectiveness of the Julia programming l... by Oreb on Saturday October 10, 2020 @10:15AM (#24739138)
Isn’t __builtin_pocountll() exactly the same as Julia’s count_ones() function?
Re:The unreasonable effectiveness of the Julia programming l... by dalke on Saturday October 10, 2020 @02:28PM (#24740835)
Thanks! Yes!

I kept looking for "popcount" and "population count", not "Number of ones in the binary representation of x." A Julia person should update the Rosetta Code implementation to use that function.

That function maps to ctpop_int which is implemented as uu_iintrinsic_slow(LLVMCountPopulation, ctpop_int, u). I ... don't know what the "slow" means.

There are follow-on problems, like my AVX2 implementation for 128 bytes stores one of the byte strings in AVX registers, and I get extra performance by prefetching. Once I get to the AVX-512 implementation, the same will happen. I don't know how well the optimizer can handle those details. ("My" = implemented by HN user nkurz.)

But this is enough of a clue for a first decently-high-performance implementation - thanks again! I talked with the person from the conference who promoted Julia. He's going to work on this/we'll work on it. I'm looking forward to seeing how the timings work out.