From 03cd602835e373f47b7c8de55b063a0cc0838eaf Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 22 Sep 2010 06:09:29 +0000 Subject: Found the following inefficiencies in fjbg: ldc being used instead of bipush or sipush. The cheaper instructions were only being used when the argument was typed as byte or short, but an Int in the byte or short range can as easily use them. This also saves an entry in the constant pool. iconst_n not being used except on Ints. Same issue in reverse: pushing short 3 on the stack is cheaper with iconst_3 than with sipush. Example: class A { def f1: Int = 100 // was ldc #X, now bipush 100 def f2: Int = 5000 // was ldc #X, now sipush 5000 def f3: Byte = 2 // was bipush 2, now iconst_2 def f4: Short = 2 // was sipush 2, now iconst_2 } Review by dragos. --- lib/fjbg.jar.desired.sha1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/fjbg.jar.desired.sha1') diff --git a/lib/fjbg.jar.desired.sha1 b/lib/fjbg.jar.desired.sha1 index 7e1cb1c13e..862868d030 100644 --- a/lib/fjbg.jar.desired.sha1 +++ b/lib/fjbg.jar.desired.sha1 @@ -1 +1 @@ -b73c0c9115d83849bada9a5c361f77745da22e0d ?fjbg.jar +3997a32211461f0f7de1e4eb37e964cd134ea003 ?fjbg.jar -- cgit v1.2.3