3 ms·
In terms of speed: int > float > decimal. Depends on the hardware type. On GPUs, float > int. However the performance difference is negligible for many, many us
by billythemaniam 4y ago
In terms of speed: int > float > decimal. Depends on the hardware type. On GPUs, float > int. However the performance difference is negligible for many, many use cases so I generally use decimal as the default and only use float if absolutely necessary.
- ninepoints 4y agoErr it really depends on what you're doing. Integer division and modulo is still not fast.
- billythemaniam 4y agoDefine "fast" please.
- ClumsyPilot 4y agoOnce you are doing microservices and serving any customer call requires 3 http requests and converting everything into JSON and back every time, it doesnt matter if you use float or int, CPU, GPU, a microcontroller or even abacus by hand.