4 ms·
Python performance tip #1: don't use it if performance is a design goal.
by admn_is_traitor 17y ago
Python performance tip #1: don't use it if performance is a design goal.
- dhotson 17y agoI wouldn't go that far as to avoid it altogether. Python makes a great glue language even in applications where performance is important. You can write all the performance critical stuff in C and then glue it together in Python. It's a pretty common approach and it works really well. Game engines often do this where the main engine is in C++ with scripting in Lua.
- stonemetal 17y agoPerformance is always a design goal for some value of performance. If print("Hello World") takes six years to execute you would give up and claim it is broken long before then even though "performance isn't a design goal".
- sophacles 17y agoPerformance can mean: blazing fast,always completes in the smallest possible time (theoretically anyway). It can also mean, runs in a reasonable time, within the parameters of the spec. Many times in the later case its faster and easier (in programmer time) to tune/tweak the slow scripting language, than it is to pull out the big guns.