about main()

Michael Torrie torriem at gmail.com
Thu Jul 5 21:14:02 EDT 2018


On 07/05/2018 11:47 AM, Calvin Spealman wrote:
> That wasn't me, but I do agree with the sentiment in that its often silly
> to focus on them at the wrong time and without constraints that warrant
> that focus.

Premature optimization is the root of all evil, the saying goes.  I see
this kind of thing all the time on hobby programming forums for
non-mainstream languages (as an example, FreeBASIC).  People are delving
into assembler all the time for "speed" rather than thinking about their
data structures and algorithms.  I'm not sure they even know where their
programs are spending the majority of their execution time.

I did some Python programming a while back that was pretty math heavy,
but with a few simple optimizations like memoization I was able to make
it run very acceptably fast.  Still an order of magnitude slower than a
C program might run, but I didn't care if it took half a second or a
millisecond for my program to run. It was fast enough.



More information about the Python-list mailing list