Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thomaswk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
thomaswk
13y ago
>(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 execution of thi
2.
▲
by
thomaswk
13y ago
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 increases.
3.
▲
by
thomaswk
13y ago
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) throws Ex
4.
▲
by
thomaswk
13y ago
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 the Javadoc