Page 1 of 1
Optimising Python speed tutorial
Posted: Thu Feb 11, 2016 10:54 am
by pythoncoder
For those who don't follow Github I've written a tutorial planned for eventual inclusion in the official docs. At this stage it's very much a draft and is doubtless littered with typos. Comments on the content are invited, especially if there are factual errors or useful techniques I've omitted. It can be read here:
http://hinch.me.uk/html/reference/speed_python.html
Re: Optimising Python speed tutorial
Posted: Thu Feb 11, 2016 11:16 am
by bmarkus
Great article, thanks!
Re: Optimising Python speed tutorial
Posted: Thu Feb 11, 2016 1:47 pm
by dhylands
Excellent.
The second to the last sentence in the Garbage Collection section doesn't make sense (well really just the bcomes at the end):
Finally performing collections regularly can reduce fragmentation in the heap bcomes.
Re: Optimising Python speed tutorial
Posted: Thu Feb 11, 2016 1:56 pm
by pythoncoder
Thanks, Dave. Now fixed.
Re: Optimising Python speed tutorial
Posted: Thu Feb 11, 2016 8:15 pm
by Roberthh
Hello @pythoncoder, that is really a good text, and it is a big support for everyone trying to code "at the bus". And I am definitely the wrong person for see typos. Maybe Damien or someone else from the core team could have a look at it, if something would have to be amended, especially about language extensions of the viper emitter.
Re: Optimising Python speed tutorial
Posted: Fri Feb 12, 2016 7:23 am
by marfis
A really useful and competent writeup. Thanks a lot for sharing.
Re: Optimising Python speed tutorial
Posted: Fri Feb 12, 2016 4:33 pm
by folke
Well, I can only second this. I have really missed this kind of good documentation.
So I feel a little uneasy to mention one small correction: Time is measured in seconds and the SI-unit is spelled with lower case "s". (The upper case "S" is used for Siemens [= 1/ohm]). So in the Python code examples, that are so good and welcome, it is a little disturbing to see the unit for time as "mS". For me this looks like "milli Siemens".
I have for a long time hesitated to mention this small thing, but since I'm sure a lot of people will enjoy pythoncoder's documentation and Python scripts, I decided to suggest this minute correction after all.
Re: Optimising Python speed tutorial
Posted: Sun Feb 14, 2016 11:16 am
by pfalcon
Great work, pythoncoder! And while this fits wll with "Development" subforum, I'm sure more wider exposure via "General" will only help, so moving it there.