3 ms·
> Unless you can produce an actual counter-argument There's no problem having a function called popcnt(), and having the C compiler recognize it just like it r
by WalterBright 11y ago
> Unless you can produce an actual counter-argument
There's no problem having a function called popcnt(), and having the C compiler recognize it just like it recognizes memcpy(), strlen(), sqrt(), etc., and generate optimal code for it.
- lisper 11y agoSure, that is not in dispute. What is in dispute is whether the same can be done in C for matrix_multiply (or, even better, m1*m2 where m1 and m2 are matrices) or string.split(string) or strings.join(sequence_of_strings) or dict.get(key) or...
- coldtea 11y agoAren't any of those negatively affected by the possibility of aliasing?
- WalterBright 11y agoNone of those I mentioned are, though C has the 'restrict' type modifier to deal with that.