On Thu, 1 Aug 2002, Dan Sugalski wrote:

> At 9:42 PM +0100 8/1/02, Nicholas Clark wrote:
> >Am I allowed to write ancillary functions I want the JIT to call in
> >assembler? I presume that the JIT needs to go fast, and I suspect that there
> >are some bits that are easier to write in assembler (eg rotates for figuring
> >out constants) than in C, for the same amount of eventual speed.
> >
> >I guess it comes down to, are we assuming that the JIT always be run on the
> >CPU which is is targeting? I suspect the answer ought to be "avoid the
> >special case" and so the answer to my original question should be "no, make
> >the JIT portable"
>
> It's the JIT--evil things for speed reasons are almost obligatory. :)
>
> Sure, go ahead and write whatever you want in assembler for the
> target platform. Just make sure that you'll assemble on that
> platform, and we'll be fine.
> --
>                                          Dan

IMHO, C version shall exist anyway, for speed comparaison first (it is
always surprising how good compilers can be in some situations), then you
could find tricks that are faster on some processors (let's say AMD) and
not on some others for the same instructions set.

I still encourage the asm version.

my .02$

Richard

Reply via email to