Skip to content

Instantly share code, notes, and snippets.

@cyberb
cyberb / Test.java
Created July 31, 2013 03:25
method call vs reflection inoke
import java.lang.reflect.Method;
public class Test {
public static final int TRIES = 10000000;
public static void main(String[] args) throws Exception {
for (int i = 0; i < 10; i++) {
long t1 = doReflection((A) Class.forName("B").newInstance());