PDA

View Full Version : Speed confirmation



ErosOlmi
10-02-2008, 23:41
ATTENTION: You need latest thinBasic preview version 1.6.0.1 installed in order to test thinCore.dll attached to this post.
_________________________________________________
Hi all.

Problem with functions having local variables (or parameters) is the necessity to allocate local storage when function start and free that storage when function ends. And this takes a lot execution time!
I think I was able to get some more speed in scripts containing functions that have either local variables or some parameter.

Some script examples to use for testing are:
\SampleScripts\General\Speed\Test_Speed2_Function_MultiParamsVsSingleUDT.tBasic
\SampleScripts\General\Speed\Test_Speed2_Function_WithLocals.tBasic
\SampleScripts\General\Speed\Test_Speed2_Function_WithParams.tBasic

Also many TBGL scripts having functions executed many times can benefit from this improve.

Thanks in advance for any spare time you will dedicate to those tests.
Eros

Attached file removed.

Michael Clease
11-02-2008, 00:17
my results on my laptop.

Petr Schreiber
11-02-2008, 00:19
Hi Eros,

now this looks interesting!
Please see the chart - I think results are very good.
There was only two test slower ( about 2%, no problem :) ), but this could be accident as all other show minor or very good improvements (14-20%).


Thanks,
Petr

ErosOlmi
11-02-2008, 00:53
What a friends here! In few minutes I have the tests done with graphics!
Thanks a lot guy.

Well, tests seems confirming my results. Functions with parameters or local variables are sensible faster.
The loops tests performing a little slower can be influenced by many things. Repeated tests can be used to confirm this.
Another aspect is the CPU type. I worked on LONG optimization and memory allocation. Those aspects can vary quite strongly in different CPUs..

Anyhow, I'm working on many optimization aspects and quite sure to have more to add.

Again thanks.
Ciao
Eros

kryton9
11-02-2008, 01:23
How are you guys getting such nice charts?

I tried doing it in MS Works, but nothing looks as good as your guys stuff!

Here is my old fashioned view. I confirm most faster by quite a bit and 2 slower.

Michael Clease
11-02-2008, 02:14
Ken look at this http://community.thinbasic.com/index.php?topic=1269.msg8903#msg8903

matthew
11-02-2008, 04:28
Here are the results from my new computer. :)

Michael Hartlef
11-02-2008, 06:48
Hi Eros,

if still needed, I do the test tonight. Have to head to work.

Cu
Michael

ErosOlmi
11-02-2008, 08:18
No, not needed anymore, thanks.

Thanks to all.
Eros

kryton9
12-02-2008, 01:04
Ken look at this [url=http://community.thinbasic.com/index.php?topic=1269.msg8903#msg8903]http://community.thinbasic.com/index.php?topic=1269.msg8903#msg8903[/url


Thanks Mike, will use next time. Sure will make life easier!!