Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Have your apps runs 400% faster or more YMMV

Have your apps runs 400% faster or more YMMV

Discuss PocketC for Palm OS (including Desktop Edition)

Postby garyduke on Thu Dec 01, 2005 5:20 am

On my tungsten C this program took 1.3 seconds (130 ticks) to run.

//performance test
main() {
int i,t;
graph_on();
t=ticks();
for (i=0;i<1000;i++) {
text (10,20,i);
}
puts(ticks()-t+"\n\n"); //outputs test result to pocketc text form; lower score is better
graph_off(); waitp();
}



**BUT** just invoking the eventing system in PToolboxLib (native games-oriented library for Palm OS) yields a result of just .34 seconds!

//performance test
library "PToolboxLib"
int x,y;
main() {
int t,i,e;
Fctl(100, &x);Fctl(100, &y); //should be a matter of habit, binds pen x and y to x and y global variables. not sure this line is needed.
e=Fevent(0); //invoke Fevent, shutting down PocketC event handling
graph_on();
t=ticks();
for (i=0;i<1000;i++) {
text (10,20,i);
}
puts(ticks()-t+"\n\n");
graph_off(); waitp();
}

Just HAD to share this with you all!!

Gary

By the way, I'd like to see results from these tests for your devices...
garyduke
 
Posts: 7
Joined: Mon Feb 18, 2002 6:47 pm

Postby garyduke on Thu Dec 01, 2005 5:28 am

by the way, as long as you don't poll event's all the time, e.g. do this instead:

while (1) {

e=Fevent(0);

t=ticks()+10;
//stuff

while (ticks()<t) {}//timer

}

then for apps that require the pen to be held down I get about a 700% increase in speed.

That's right!! It the scores were 235 ticks compared to just 34 ticks.


Gary
garyduke
 
Posts: 7
Joined: Mon Feb 18, 2002 6:47 pm

Postby hgrimm on Sun Dec 04, 2005 4:11 pm

Hallo Gary,
I just did the experiment on my new TX:
the first runs .95 Secs
the scond runs .39 Secs
so 240% difference

Herbert
hgrimm
 
Posts: 7
Joined: Tue Dec 17, 2002 12:46 pm

Postby garyduke on Thu Dec 08, 2005 7:31 am

Great!
garyduke
 
Posts: 7
Joined: Mon Feb 18, 2002 6:47 pm

Postby Atomo64 on Tue Dec 27, 2005 1:28 am

of course it is going to work faster, the PocketC applications are interpreted, they are not on assasembly language; so if you use a library wich is used directly instead of being interpreted by an other application(in this case PocketC), well, here you got why...

http://www.atomo64.tk the best site, manuals, news, everything.
Help the cancer research in 2 minutes [url]http://www.grid.org/services/teams/team.htm?id=9C178A94-AD48-45F9-B6C9-4C84EA8ED078[url]
Atomo64
 
Posts: 45
Joined: Wed Feb 18, 2004 11:14 pm

Postby jstadolnik on Wed Dec 28, 2005 7:38 pm

Atomo64,

No it has little to do with running through a native library. By default PocketC performs some special background event processing every couple of operations so that programs which don't have event calls can still be exited.

The PToolboxLib's Fevent() function disables this background checking (the background checking would "steal" events Fevent if this weren't done). So the speed gain with Fevent() is actually due to the lack of PocketC's normal background event checking... it is not from Fevent doing things faster (though it does do forms stuff much quicker).

-Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 1 guest

cron