Hi RĂ©mi,

On 2019-01-02 13:05, Remi Forax wrote:
Hi Claes,
did you try instead of having a field 'internal' to inline the class check 
(this.getClass() == PrintStream.class) at every call site you are reading that 
field ?

for a method like println(), the VM has to do a class check (if CHA is 
defeated) before entering the method println so the JIT might be able to remove 
the check this.getClass() == PrintStream.class because it already know at that 
point that the current class is PrintStream.

interesting idea - I'll try it out. I don't expect it to make much of a
difference in my current (trivial) tests, but perhaps in a slightly more
contrived setup.

happy new year!

/Claes

Reply via email to