Speed of parserhook

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Speed of parserhook

Post by King Harold »

I wrote a simple program that would calculate the Sine of a number (intercepted the sin( token and returned bcall(_Sin) )
I then compared it to the normal sin( (which means i wrote a basic program that would loop 1000 times over 7 sin(x) 's and output(1,1,x) when x is the variable in the for loop.
When the normal sin was at 1000, the parserhooked sin was at 921 (the result is probebly not reliable, but it gives some idea about how fast a parserhook actually is)
Well, parserhooks are still very fast, but around 10% slower then the TI OS.
I thought I'd just mention this for all us parserhook programmers.
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

It kind depends what you actually do in the parser hook as to how fast it will be. They are also still a lot faster than using Asm utilities, and you dont have to worry about RAM as much :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

Yep, but im just saying that a parserhooked bcall(_sin) is slower then the origional sin( so whatever the parserhook does to call the app (it calls the saved hl and does something with the page?) takes more time then not doing that, which makes sence but 10% is quite a bit.
And yes, Asm( is terribly slow.
I really like those hooks but for some reason I can't properly sign apps, PindurTI accepts them but my real calc rejects them as invalidly signed.. :(
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Does TI Flash Debugger accept them? Have you tried manually signing them?
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

TI Flash Debugger accepts them, and I've manually drag'n dropped the hex on wappsign but that didnt make a difference.
Since my calc accepts apps like xLIB Omnicalc Calcsys and CtlgHelp it can't really be my calc, I hope :P
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Strange, maybe there is something wrong with your header?

I still dont understand the comparison between having a parser hook do something that the tios does itself ... of course its going to be slower, but replacing existing tios functions is not the point of hooks.
Last edited by tr1p1ea on Fri 06 Oct, 2006 7:31 pm, edited 2 times in total.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

I know its not the point of it, I was just trying to see how much time it takes for the parserhook to activate or whatever you call it, I thought it might be interesting, it seems to take quite a while.
And I could only compare a function that both the app and the TIOS could do and take a fair amount of time, os a sine or cosine is perfect, I think.

I'll mess a bit with the header then.. Hope it helps..
Post Reply