Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, this is an extremely trivial problem. Anybody who knows how to program in more than one language is going to find this silly. awk or perl would finish it before jit compilation gets started.


It's a trivial problem to implement, but not trivial to implement faster than others. Awk won't beat solutions that are clever about multiple read queues and parallel processing.


Bit of an update, the record is now 8 seconds in java.

I have tried 2 naive awk implementations and both took 10x the basic java implementation btw (I'm sure it too can be optimized).


Just stick to Java


Please try it out in awk. It would be interesting to see whether awk can do this in a few seconds.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: