Re:Brian's Rules for Writing Cross Platform 'C' Code (2008)
by foxhill on Saturday June 14, 2014 @11:51AM
(#7892989)
really, the issue is, if you want a fixed bitwidth data type, use the types in unistd.h - uint64_t or uint32_t.
[ Parent
| on HN ]
Re:Brian's Rules for Writing Cross Platform 'C' Code (2008)
by omilu on Saturday June 14, 2014 @06:53PM
(#7893924)
but fixed width data types are super freaking slow if your doing intensive processing.
Re:Brian's Rules for Writing Cross Platform 'C' Code (2008)
by brianwski on Monday June 16, 2014 @09:54PM
(#7902473)
I'm not buying it. I want to see your timings and proof. First of all, this only applies to a very few internal loops that don't touch disk, so you can use the "cross platform rule" for 99.999 percent of code. But if you are down to that last inner loop that runs your 3D video game, I'll admit you will need to have platform dependent code paths. But this describes an infinitesimally tiny subset of the code in the world. The rest of the time, write easy to understand cross platform less buggy code!