#! perl -slw use strict; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'END_C', NAME => 'rand64fast', CLEAN_AFTER_BUILD => 0; void rnd( int n ) { // dSP; // static __int64 y = 2463534242; static int y = 2463534242; // My machine is 32-bit. // EXTEND( SP, n ); Inline_Stack_Vars; Inline_Stack_Reset; while( --n ) { y ^= y << 13; y ^= y >> 17; y ^= y << 5; // mPUSHi( (IV)y ); Inline_Stack_Push( sv_2mortal( newSViv(y) ) ); // mXPUSHi(y); // Could have used this instead. Note the added X } // return; Inline_Stack_Done; } END_C print for rnd( 100 );