On Thu, 2007-06-21 at 22:30 +0100, Charles Forsyth wrote:
> >Note that most A/V libraries out there make
> >extensive use of inline assembly, how would that fit in with "The Plan 9
> >way"?
> 
> it depends whether it's actually sensible, since the inline assembly often
> does little enough.  in this case, assuming it makes sense, you'd just write
> it up in .s and call it.  if the overhead of a function call is too much,
> there wasn't much point in doing the low-level fiddling in the first place.
> that's roughly the approach.

  I still disagree. Here's why: I tried it in FFmpeg once and the basic
lesson was it wasn't so much the cost of the call per se that killed 
performance but the fact that the register allocation was totally
screwed up if you had to resort to separate functions in .s files
all of which get called as part of a bigger complex computation routine.
And this is, basically, what SIMD is all about: it gives you nice
building blocks but they are so low level that you have to be really
conscious of how you use them. 

Thanks,
Roman.

Reply via email to