Skip to content

Instantly share code, notes, and snippets.

@jrudolph
Created December 4, 2010 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrudolph/728116 to your computer and use it in GitHub Desktop.
Save jrudolph/728116 to your computer and use it in GitHub Desktop.
Local variable vs. JIT test
public class Test {
public static class T2 {
public T2(String str1, String str2, String str3) {
if (str1.length() > 12)
System.out.println("Hello World");
}
}
public static void runner() {
String str1 = "test";
String str2 = "test2";
String str3 = "test3";
new T2(str2, str3, str1);
}
public static void main(String[] args) {
for (int i = 0; i < 100000; i++)
runner();
}
}
This file has been truncated, but you can view the full file.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment