News for hackers. Stuff that matters.
Re:Rust's integer intrinsics are impressive by Animats on Saturday June 10, 2017 @02:57AM (#14526429)
Now that most CPUs have population count, it may as well be exposed at the language level.

Doing it by table lookup results in questions such as "am I wasting too much cache space on this?" and "is a 64K table causing cache misses".

Re:Rust's integer intrinsics are impressive by tjalfi on Saturday June 10, 2017 @11:59AM (#14527795)
Fortran 2008 added a number of bit twiddling intrinsics[0].

Here are a few of the scalar intrinsics for bit counting.

  popcnt() - population count
  leadz() - leading zero
  trailz() - trailing zero
  poppar() - parity
[0] ftp://ftp.nag.co.uk/sc22wg5/n1701-n1750/n1729.pdf

Edited to fix formatting.

Re:Rust's integer intrinsics are impressive by mpweiher on Saturday June 10, 2017 @03:01AM (#14526439)
> be exposed at the library level.

TFTFY :-)