"It's not fast because it's not a binary"
Thank you Capt. Obvious, but that script took me a total of 5 minutes to write, 2 to debug/fine-tune, while it took you half a day to work out how to write it in your language (after I gave you my "script" to use as a reference on how to complete the task). Which is now more efficient?
Actually I'll expand this a little.
The task was to chunk a 861Mb file into easy to consume pieces (with some content analysis put into the chunking). Not a major task, but an easy little test to see what he could do.
The original "script" I wrote was no more than 700bytes, of which 100 was easily the hard-coded file name. It was quickly hacked together on a P4 2.8 machine running Ubuntu 10.04 with a blistering 768Mb of RAM (welcome to my test and mess around machine). It could have been smaller, but I didn't want to spend time on such a trivial process.
He rewrote my "script" in his language on his development machine (of which I don't have to specs for, but I know it's more than my development machine) and compiled it.
At the point of writing this I ran the same original script on my development machine, Windows XP SP3, Dual Core 2.0 with 3Gb of RAM. Again nothing to be proud of, but it does the job.
And the results are:
--
My Test Machine (Script): 383s (2.24Mb/s)
My Development Machine (Script): 228s (3.77Mb/s)
His Development Machine (Binary): 210s (4.10Mb/s)
--
Technically I wouldn't call these "results" due to the fact that I don't know what spec his machine is (and I guess the results would be closer if I was to run the binary on my development machine), but a savings of 18 seconds isn't that something worth "gloating" about when he wasted half a day (or possibly more) trying to achieve that result.












