Swap should be better done native?

Ulf Zibis Ulf.Zibis at gmx.de
Wed Mar 31 11:23:17 PDT 2010


Am 30.03.2010 20:23, schrieb Florian Weimer:
> * Ulf Zibis:
>
>    
>> In java.nio.Bits, there are several swap methods.
>>
>> Shouldn't this be done better by a native method, as popular CPU's IMO
>> would do that faster, and HotSpot easily could inline the single
>> instruction?
>>      
> Do you mean an intrinsic method?  (Non-native methods can be
> intrinsics, too.)
>    

Looking at the disassembly, I can't see any intrinsic method for swap.

-Ulf




More information about the nio-discuss mailing list