(no title)
ajbonkoski | 8 years ago
Typically there are two modes in my computing: (1) Scripting / Command-line get stuff done and throw-away, and (2) Serious applications that are heavily used, need to process lots of data and be as fast as possible (e.g. processing millions of files like this one where the algorithm constant factor really matters).
In case 1: Hack something together with shell or python and get an answer. If it takes 100-1000x of the equivalent C program, than fine..
In case 2: Custom special purpose C or C++ code
I really don't understand the middle ground here. The equivalent C version that does the same job runs in ~250 millis on my slow Yoga 2 Pro laptop. Total line count 83 of pure C (no other libraries).
Is it "elegant"? Depends who you ask.. But, at the end of the day, "elegant" doesn't pay the bills..
bionsuba|8 years ago
People use Python all the time to manipulate data sets >= 100G in size despite its speed failings at that size. Why? Because Pandas is just so damn convenient. It would take me a grand total of 30 seconds to write Pandas code which read a TSV and gave me the sum of two multiplied together columns grouped by the day of a timestamp column. Doing that in C would take several orders of magnitude more time.
It's an optimization of people's time problem. You could probably spend several hours (or days) writing a C program for a specific problem. But if you can spend only 40% of the time writing the program and have it only 20% slower, then that's a definite win (these numbers are just an example).
acehreli|8 years ago
mhh__|8 years ago
colechristensen|8 years ago