Nicholas Clark wrote:

On Mon, Nov 25, 2002 at 04:51:05PM +0100, Leopold Toetsch wrote:

Gopal V wrote:


/*
** dotgnu.ops
*/

Thanks applied,

I'm surprised that you did your regression tests longhand, rather than having
a data table in perl of input and expected output, and auto-generating parrot
code.

Writing a few explicit tests is faster ;-)


Is there any speed advantage in truncating by casting via a C type
[eg a = (int)(short) b]
rather than  and on a bitmask
[eg a = b & 0xFFFF]
?

gcc uses MOVSX (movs{b,w}l), move byte/word with sign extend to 32 bit. This is listed to take 3 cycles which "and mem" needs too. Inkluding sign extension would be slower then.


We're going to have to do that latter to make it work on Crays anyway, so is
a conditional compile to chose between the two worth it?

My Cray is currently out of order ;-) What is special with it?


Nicholas Clark
leo


Reply via email to