3 ms·
Yes, but so does run-time generics somewhere along the line.
by dded 13y ago
Yes, but so does run-time generics somewhere along the line.
- sepeth 13y agoReally? AFAIK, compiler creates those functions/classes from corresponding generics (it is called templates in C++, and it really acts like template in C++). Hence, they are compile time. I believe, it is the same in Java, too: http://docs.oracle.com/javase/tutorial/java/generics/erasure.html http://docs.oracle.com/javase/tutorial/java/generics/erasure...
- dded 13y agoWell, yes, compile-time generics are compile-time. That's why I said "runtime".
- willvarfar 13y agoYes, but you are recommending he do that in Go, so by having an extra array lookup you'd be further slowing down the Go program, which he says is 5x slower than the Java program already.