[A83] Re: im 2


[Prev][Next][Index][Thread]

[A83] Re: im 2




> > > > Your logic doesn't make any sense.  Having less control over your
> > > > program doesn't make it faster.

> > Oh yes, it can...

> I don't think so.  Doing something in hardware can save you cpu time.  But
> using a timer interrupt and having routines randomly interrupt each other
> will not make a program faster.

The interrupt will finish sooner leaving more time for normal progam flow before the next interrupt occurs. Therefore normal code takes less time to execute, so it is faster.

> Context switches like that incur the penalty of having to save the state of
> the registers.  If you really want to get the most cycles per second, you
> need to disable the interrupts and do everything yourself.  You save the
> time it takes to save/restore registers, or gain the use of shadow
> registers.  Using shadow registers can save you a lot of time.

Putting it into the main program isn't really an option for me. I need consistent timings. I know, you can do that in a normal program too, but that's hard.


-----------------------------------------------------
Mail.be, Free WebMail and Virtual Office
http://www.mail.be