Re: [hatari-devel] Microwire register value on Falcon |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On lauantai 04 helmikuu 2012, Nicolas Pomarède wrote:
> On 03/02/2012 23:52, Eero Tamminen wrote:
> > Btw. I was thinking that the "pFunction" member in INTERRUPTHANDLER
> > is superfluous and and that compiler might be able to optimized
> > checking all members of a bool array better than checking struct array
> > bool members. With such changes, there are much less data holes for
> > CPU cache. If that indeed is faster, maybe something like attached
> > patch could be considered for the Hatari v1.7? :-)
>
> I see what you mean with your patch, but I'm not sure splitting the
> struct array with 2 members in 2 arrays. This would need to be measured
> of course to be sure, but I would not expect the gain to be noticeable
OK.
> (at the asm level the cpu can use the equivalent of xx(a0) to access the
> bool or the cycles, without any real penalty on modern cpu ; and I don't
> expect any recent cpu to not be able to have the whole interrupt array
> in its cache).
I was more of hoping that it could optimize the bool array lookup
which happens most frequently, currently it has currently 20 items
and GCC seems to be using bytes for the bools (the bool[20] array
size is 20 bytes on my setup). It could be checking 4 of them at
the time...
How many interrupts there are typically in use at any given moment?
Are there some interrupts that happen relatively rarely? Maybe
it would help if the interrupts would be ordered according to
to how frequently they typically occur, or which ones go together?
- Eero