top | item 38866002

(no title)

lessbergstein | 2 years ago

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.

discuss

order

viraptor|2 years ago

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.

declaredapple|2 years ago

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).

Jaxan|2 years ago

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