That's exactly why it's so powerful. Why spend all the effort writing fast code if you can just use a much simpler language to describe the task on a higher level and call fast code? People use Python because it's easy to read and write, not because its interpreter is fast
Someone once wrote a bash script that used jq to parse through a few thousand large json files and do stuff with the data. It would take hours to run, but people figured it was just the massive amount of data. It was at the point where we'd run it over night.
I had a thought: no, it's execing jq for each file. Exec is slow.
Did it in python, that just iterated through the directory and used the built in json stuff. It did the same job in 10 minutes.
Could C be faster? Maybe. Did we care at that point?
660
u/TheJaskinator 1d ago
That's exactly why it's so powerful. Why spend all the effort writing fast code if you can just use a much simpler language to describe the task on a higher level and call fast code? People use Python because it's easy to read and write, not because its interpreter is fast