Remove the assert in Integer.valueOf() (original) (raw)
Rémi Forax forax at univ-mlv.fr
Mon Apr 23 23:23:41 UTC 2012
- Previous message: Remove the assert in Integer.valueOf()
- Next message: Remove the assert in Integer.valueOf()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 04/24/2012 12:32 AM, Alex Lam S.L. wrote:
Just curious - I am assuming that assertions are disabled during the test runs, so wouldn't one expect the "assert" statements to be ignored / removed?
Obviously it didn't in this case, yet I thought we are expecting constant conditionals to be optimised, e.g. if (a == null) {...} to be removed if "a" can never be null?
asserts like nullchecks that are never null are removed in the generated code but because the inlining heuristic uses the bytecode size of the method so these constructs may have an impact on the performance (note that in my example the call is deep in the inlining tree so at that point the JIT will only inline small methods).
Alex.
Rémi
- Previous message: Remove the assert in Integer.valueOf()
- Next message: Remove the assert in Integer.valueOf()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]