Have often used int like that instead of floats.

 

The second method also allows you to load a UTF 16 ( or UTf 8 string ) into
a YMM register and subtract a constant ( in register) sequence of
0x30/0x30/0x30/ etc .. then validate by ensuring all fields are >0 and less
than 9 ( which can also be constants).  So you can do 32 digit number on the
new CPUs ( 64 for ascii or UTF8)  and 16 digits on the older ( or 32 for
UTF8) .. Then you can mult and add a constant register with  10^1 ,10^0  to
convert to a long  etc . 

 

Looks like people have done exactly that with some implementations  , down
to 10  cycles  optimal http://www.mersenneforum.org/showthread.php?t=11590

 

 

Here is an article  on converting to and from UTF8 as well using SIMD

 

http://woboq.com/blog/utf-8-processing-using-simd.html

 

 

Ben

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to