>(though I'd think the JIT would eventually get around to eliminating most of that overhead you see) 150000000 iterations of a loop would warm the coldest JIT. JIT speeds up bytecode execution - but if you trace the…
I'd phrase it in a nicer way in an interview, but on a forum: You're wrong. The explicit buffering afforded by read(byte[]) & write(byte[], off, len) vs. read() & write(int) saves demonstrable time as file size…
Sigh so half of an interview is to probe the candidate's knowledge and the other half is to understand their thought process. So my ideal impl in java would be: public class F { public static void main(String [] args)…
I have a healthy love/hate relationship with Java - but that's the first thing I thought of too. Alternatively you could read into a byte[] buf and not have any casting. This is valid JDK 1 code. You only need to read…
>(though I'd think the JIT would eventually get around to eliminating most of that overhead you see) 150000000 iterations of a loop would warm the coldest JIT. JIT speeds up bytecode execution - but if you trace the…
I'd phrase it in a nicer way in an interview, but on a forum: You're wrong. The explicit buffering afforded by read(byte[]) & write(byte[], off, len) vs. read() & write(int) saves demonstrable time as file size…
Sigh so half of an interview is to probe the candidate's knowledge and the other half is to understand their thought process. So my ideal impl in java would be: public class F { public static void main(String [] args)…
I have a healthy love/hate relationship with Java - but that's the first thing I thought of too. Alternatively you could read into a byte[] buf and not have any casting. This is valid JDK 1 code. You only need to read…