3 ms·
In the worst case, and this is pretty rare these days, yes, adding two floats is a function call, but without memory allocation. Integer division or multiplica
by stephc_int13 5y ago
In the worst case, and this is pretty rare these days, yes, adding two floats is a function call, but without memory allocation.
Integer division or multiplication of long (64bits) can also force the compiler to inline a bit more code or even to call a function on older architecture, hardware division was not a given on ARM before ARMv6 I think, so for example on the Gameboy Advance or even the Nintendo DSi you had to be careful with division etc.
But again, this will only slow down your code if you're not careful, not generating memory leaks silently in the background.
- otabdeveloper4 5y agoWhy 'memory leaks'? Presumably, destructors will be automatically called one way or another. In the simplest case, you can just store all strings on the stack.