Hi,

I'm porting a piece of code that runs in an interrupt and which access
the state it operates on through a pointer to a struct. 
It is has been implemented that way because different instances of the
struct are used at times so having a pointer access makes code more
generic, managable and clean.

I had quick peek at the generated code and noticed that pointer access
to a structure involved call to some support function to handle the
generic pointer.

Now I'm slightly concerned that the pointer access seems rather
expensive in terms of execution time (the interrupt will be
called several thousand times per second). I'm thinking maybe I should
refactor the code to directly access global variables.

 Any thoughts on that?

I know I'm theorizing ahead of my data but it is critical for this
application to get the interrupt as fast as possible as it will be the
factor that determines the overall device performance. Ideally I would
be able to get up 15kHz but several kHz are a must.

br Kusti


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to