OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

about main()


On Thu, Jul 5, 2018 at 12:59 PM, Jim Lee <jlee54 at gmail.com> wrote:

>
>
> On 07/05/18 05:14, Marko Rauhamaa wrote:
>
>> Abdur-Rahmaan Janhangeer <arj.python at gmail.com>:
>>
>>> * Create as many functions as you can
>>>>
>>> performance?
>>>
>> Python?
>>
>> Seriously, though. The principle of expressive encapsulation is one of
>> the basic cornerstones of writing computer programs. Performance barely
>> ever becomes a question, and even more rarely has anything to do with
>> the number of function calls (low-level programming language compilers
>> optimize efficiently).
>>
>> The most important objective of software development is the management
>> of complexity. Silly performance optimizations are way down the priority
>> list.
>>
>>
>> Marko
>>
>
> Sadly, this *is* the current mindset.
>
> "Don't bother optimizing, the compiler does it better than you can."
>

I think that is a pretty clear mis-characterization of what was said.

The mindset isn't that optimization will be done for you, but that it isn't
high on a priority list. This is doubly true when looked at from a planning
perspective. Make something work first, make it organized and
understandable, and *then* and only if measurements warrant it do you need
to put resources explicitly towards performance.

Not because performance isn't important or that someone else will do it for
you, but because most problems and contexts do not have constraints that
warrant it as a high and immediate priority.

Tell me, who writes the compilers?  When we die off, nobody will have a
> clue how to do it...
>
> -Jim
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>