Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Wack61916yNot sure what language you're using, however make sure to turn all optimisation off, as most compilers will be able to know, that this function always returns 2 and thus replace the whole function call (including saving registers, setting up and tearing down a stackframe and so on) with a simple contant value...
-
Wack61916y@iamavalos I like java, but I don't know enough about the inner workings of it's compiler. Still I think it would at least optimize the stack frame setup and teardown. Also test it there with the java equivalent of -o0
-
@Wack In Java any method not marked as final is virtual and can be overriden, so he should be fine.
Related Rants
I'm testing that functions in a service I made are accessible to activities that bind to it and this is what I call to ensure that
random
test
dumb
return constant
not so funny