[Andreas L. Delmelle]

<snip />


    public static void testInstanceOf(Prop prop) {
        for (int i = ITERS; i >= 0; i--) {
            boolean x = prop.getString() != null;
        }
    }

    public static void testCall(Prop prop) {
        for (int i = ITERS; i >= 0; i--) {
            boolean x = prop instanceof StringProp;
        }
    }



I'd swap either the method names or the contained expressions to get
dependable results (typo?

Yeah, an embarrassing copy&paste bug. Thanks for catching it. The result is then:


[/d/fop] /c/java/jdk1.2.2/jre/bin/java.exe  -cp . x
false method call 581
true method call 581
false instanceof 160
true instanceof 170

[/d/fop] /c/java/jdk1.3.1_03/jre/bin/java.exe  -cp . x
false method call 1272
true method call 2304
false instanceof 17945
true instanceof 912

[/d/fop] /c/java/j2sdk1.4.2_02/bin/java.exe -cp . x
false method call 2154
true method call 2754
false instanceof 590
true instanceof 651

regards,
finn




Reply via email to