News for hackers. Stuff that matters.
Re:Python Performance Tips by admn_is_traitor on Monday January 04, 2010 @10:55PM (#1031811)
Python performance tip #1: don't use it if performance is a design goal.
Re:Python Performance Tips by dhotson on Monday January 04, 2010 @11:18PM (#1031841)
I 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.

Re:Python Performance Tips by sophacles on Tuesday January 05, 2010 @09:29AM (#1032398)
Performance 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.
Re:Python Performance Tips by stonemetal on Tuesday January 05, 2010 @09:22AM (#1032380)
Performance 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".