How do I choose the correct primative?

Jake Thomas jake at fake.com
Fri Jan 3 19:27:34 PST 2014


>Keep in mind that RAM access is slow compared to how fast CPUs
>run. It can be beneficial to have "slower" data types if they
>allow more data to fit into the CPU cache.

Abosolutely fantastic point, Marco!

Except if everything still fits in cache as "fast" types, it'd be 
worth having faster types.


How do you folks decide if a number should be an int, long, or 
even short?

I guess the exact type of variables should remain up in the air 
until the whole thing is implemented and tested using different 
types?

Wow, this is an active forum, I must say. Much thanks!
Jake


More information about the Digitalmars-d-learn mailing list