On Wed, Jul 31, 2013 at 11:11 PM, Ben Kloosterman <[email protected]>wrote:

> Have often used int like that instead of floats.
>

Oh sure. In to convert to float is hardly new. What was interesting about
this was two things:

1. The integer conversion loop and the floating conversion loop had a
natural fusion, and nobody seems to have documented it in the literature.
2. There's a much easier method for floating point conversion than I have
seen elsewhere documented. *So* much easier that I wonder what boundary
condition related to precision it fails to address.

shap



> ****
>
> ** **
>
> 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
>
>
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to