Jump to page: 1 25  
Page
Thread overview
128 bit signed and unsigned integer types
Dec 28, 2008
Walter Bright
Dec 28, 2008
BCS
Dec 28, 2008
Robert Fraser
Dec 28, 2008
John Reimer
Dec 28, 2008
Walter Bright
Dec 28, 2008
bearophile
Dec 28, 2008
dsimcha
Dec 28, 2008
Yigal Chripun
Dec 29, 2008
Yigal Chripun
Dec 29, 2008
Martin d'Anjou
Dec 29, 2008
Chad J
Dec 30, 2008
Daniel Keep
Dec 30, 2008
Don
Dec 30, 2008
Christopher Wright
Dec 30, 2008
Sean Kelly
Dec 28, 2008
dsimcha
Dec 28, 2008
John Reimer
Dec 28, 2008
bearophile
Dec 28, 2008
John Reimer
Dec 28, 2008
Walter Bright
Dec 28, 2008
bearophile
Dec 28, 2008
Daniel Keep
Dec 28, 2008
Walter Bright
Dec 28, 2008
Derek Parnell
Dec 28, 2008
Tim M
Dec 28, 2008
Don
Dec 28, 2008
Jason House
Dec 28, 2008
Walter Bright
Dec 28, 2008
Robert Jacques
Dec 28, 2008
Miles
Dec 29, 2008
Moritz Warning
Dec 28, 2008
Saaa
Dec 29, 2008
Martin d'Anjou
December 28, 2008
You know, the unimplemented 128 bit integer types.

Does anyone have a use for these?
December 28, 2008
Reply to Walter,

> You know, the unimplemented 128 bit integer types.
> 
> Does anyone have a use for these?
> 

I'd like to see them. Some times it can be handy to have a "larger" integer than the default size, so as 64bit get implemented (it is right?) I think it will be handy.


December 28, 2008
Walter Bright Wrote:

> You know, the unimplemented 128 bit integer types.
> 
> Does anyone have a use for these?

Well the only uses I can think of, I'd prefer an unlimited-size big integer struct anyway... Since they can't be operated on in registers (at least in x86), their value seems limited.
December 28, 2008
Hello Walter,

> You know, the unimplemented 128 bit integer types.
> 
> Does anyone have a use for these?
> 


Was that "cent" and "ucent"?

Would any of these map well to SSE Instructions on Intel CPU's?

-JJR


December 28, 2008
== Quote from Walter Bright (newshound1@digitalmars.com)'s article
> You know, the unimplemented 128 bit integer types.
> Does anyone have a use for these?

Well, we've got bigints in both Phobos and Tango now.  Given the clumsiness or downright impossibility of manipulating 128-bit ints in hardware on x86-32, would they even be much faster than bigints?  I mean, you couldn't even fit 2 128-bit ints plus a stack pointer in the general-purpose registers of an x86.
December 28, 2008
John Reimer wrote:
> Hello Walter,
> 
>> You know, the unimplemented 128 bit integer types.
>>
>> Does anyone have a use for these?
>>
> 
> 
> Was that "cent" and "ucent"?

yes.

> Would any of these map well to SSE Instructions on Intel CPU's?

Not a chance :-(
December 28, 2008
Hello dsimcha,

> == Quote from Walter Bright (newshound1@digitalmars.com)'s article
> 
>> You know, the unimplemented 128 bit integer types. Does anyone have a
>> use for these?
>> 
> Well, we've got bigints in both Phobos and Tango now.  Given the
> clumsiness or downright impossibility of manipulating 128-bit ints in
> hardware on x86-32, would they even be much faster than bigints?  I
> mean, you couldn't even fit 2 128-bit ints plus a stack pointer in the
> general-purpose registers of an x86.
> 


That's why I was asking about SSE... I believe that they have 128-bit registers that can be viewed as integers and unsigned integers.  But I'm not very familiar with how this works.

-JJR


December 28, 2008
dsimcha wrote:
> == Quote from Walter Bright (newshound1@digitalmars.com)'s article
>> You know, the unimplemented 128 bit integer types.
>> Does anyone have a use for these?
> 
> Well, we've got bigints in both Phobos and Tango now.  Given the clumsiness or
> downright impossibility of manipulating 128-bit ints in hardware on x86-32, would
> they even be much faster than bigints?  I mean, you couldn't even fit 2 128-bit
> ints plus a stack pointer in the general-purpose registers of an x86.

It can be done (not impractical at all), the issue is is it worth while?
December 28, 2008
On Sat, 27 Dec 2008 20:38:12 -0800, Walter Bright wrote:

> You know, the unimplemented 128 bit integer types.
> 
> Does anyone have a use for these?

Cryptographers would.

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
December 28, 2008
Walter Bright:
> It can be done (not impractical at all), the issue is is it worth while?

128 bit are two words in the 64-bit CPUs that are now getting very common. So it's  like 64 bit operations on 32 bit CPUs.

A possible use is for runtime test for overflows: you can perform operations among 64 bit integers with 128 bit precision, and then you can look at the result if it fits still in 64 bits. If not, you can raise an overflow exception (probably there other ways to test for overflow, but this seems simple to implement). You can use 64 bits to implement the safe operations among 32-16-8 bit numbers on the 64 bit CPUs).

Bye,
bearophile
« First   ‹ Prev
1 2 3 4 5