Linked by Thom Holwerda on Tue 15th Jan 2013 22:29 UTC
Permalink for comment 549019
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
Features
Linked by Thom Holwerda on 05/24/13 17:26 UTC
Linked by Thom Holwerda on 05/21/13 21:38 UTC
Linked by Thom Holwerda on 05/20/13 11:29 UTC
Linked by Thom Holwerda on 05/18/13 21:33 UTC
Linked by David Adams on 05/16/13 4:23 UTC
Linked by Thom Holwerda on 05/11/13 21:41 UTC
Linked by Thom Holwerda on 05/08/13 14:22 UTC
Linked by Thom Holwerda on 05/02/13 15:28 UTC
Linked by Thom Holwerda on 04/29/13 21:06 UTC
Linked by Thom Holwerda on 04/24/13 22:24 UTC
More Features »
Sponsored Links



Member since:
2011-01-28
A lot of optimizations can be done with the CPU flags. The trouble is that high level programming languages don't expose them, I'm looking at you C. The C language for it's part assumes the flags don't exist so that it doesn't have to emulate them on architectures which don't have them.
Something as basic as determining whether A+B has overflowed is non-trivial in C, especially considering how overflow logic gets optimized away, see this heated discussion in GCC's bug tracker:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475
IMHO the lack of overflow flags is a deficiency of most high level languages.
Another flag we don't see much of is the parity flag, but I've found a very interesting way to use parity bits to optimize multi-word multiplication algorithms. An efficient population count function would do the trick too since the least significant bit represents parity. Even though C is thought to be the best low level language, there still exists a gap between it and assembly language.
Edited 2013-01-16 15:52 UTC