Re: Questions about PDD 4: Internal data types

2001-03-02 Thread Dan Sugalski
At 12:21 PM 3/2/2001 -0800, Hong Zhang wrote: >I believe we should use low bits for tagging. It will make switch >case much faster. That's pretty much what I intended. The only reason not to have them as the low bits is if there's some other field that uses multiple bits, and optimizing for th

Re: Questions about PDD 4: Internal data types

2001-03-02 Thread Hong Zhang
I believe we should use low bits for tagging. It will make switch case much faster. If you still emphasize on speed, we can make 0x05 => UTF-8 0x06 => UTF-16 0x07 => UTF-32 #define IS_UTF_ANY(a) \ (((a)->flags & 0x07) >= UTF-8) However, I don't believe it is needed. Hong > If your inter

RE: Questions about PDD 4: Internal data types

2001-03-02 Thread NeonEdge
If your interest is in speed alone, then adding UTF_16 might offer options as well: FORMAT (enc_flags): 7|6|5|4|3|2|1|0 x x 0 0 1 x x x = UTF_8 x x 0 1 0 x x x = UTF_16 x x 1 0 0 x x x = UTF_32 then: #define UTF 56 utf_encoding = UTF & enc_flags; if( utf_encoding ) { cout << "String is UTF_"

Re: Questions about PDD 4: Internal data types

2001-03-02 Thread Dan Sugalski
At 07:12 PM 3/2/2001 +, Nicholas Clark wrote: >On Fri, Mar 02, 2001 at 02:01:35PM -0500, Dan Sugalski wrote: > > At 02:01 PM 3/2/2001 -0500, wiz wrote: > > > > =item BINARY (0) > > > > =item ASCII (1) > > > > =item EBCDIC (2) > > > > =item UTF_8 (3) > > > > =item UTF_32 (4) > > > > =item NATIV

Re: Questions about PDD 4: Internal data types

2001-03-02 Thread Nicholas Clark
On Fri, Mar 02, 2001 at 02:01:35PM -0500, Dan Sugalski wrote: > At 02:01 PM 3/2/2001 -0500, wiz wrote: > > > =item BINARY (0) > > > =item ASCII (1) > > > =item EBCDIC (2) > > > =item UTF_8 (3) > > > =item UTF_32 (4) > > > =item NATIVE_1 (5) through NATIVE_3 (7) > > > >A little more complex, but wh

RE: Questions about PDD 4: Internal data types

2001-03-02 Thread Dan Sugalski
At 02:01 PM 3/2/2001 -0500, wiz wrote: > > =item BINARY (0) > > =item ASCII (1) > > =item EBCDIC (2) > > =item UTF_8 (3) > > =item UTF_32 (4) > > =item NATIVE_1 (5) through NATIVE_3 (7) > >A little more complex, but why not use bits 3-7 as actual flags: >7|6|5|4|3|2|1|0 >0 0 0 0 1 x x x = UTF && U

RE: Questions about PDD 4: Internal data types

2001-03-02 Thread wiz
> =item BINARY (0) > =item ASCII (1) > =item EBCDIC (2) > =item UTF_8 (3) > =item UTF_32 (4) > =item NATIVE_1 (5) through NATIVE_3 (7) A little more complex, but why not use bits 3-7 as actual flags: 7|6|5|4|3|2|1|0 0 0 0 0 1 x x x = UTF && UTF_8 0 0 0 1 1 x x x = UTF && UTF_32 x x 1 0 1 x x x =

Re: Questions about PDD 4: Internal data types

2001-03-02 Thread Andy Dougherty
On Fri, 2 Mar 2001, Dan Sugalski wrote: > At 10:31 AM 3/2/2001 -0800, Hong Zhang wrote: > > > Integer data types are generically referred to as Cs. There is an > > > C typedef that is guaranteed to hold any integer type. > > > The intention is that if you need to deal with integers in an abstrac

Re: Questions about PDD 4: Internal data types

2001-03-02 Thread Dan Sugalski
At 10:31 AM 3/2/2001 -0800, Hong Zhang wrote: > > Integer data types are generically referred to as Cs. There is an > > C typedef that is guaranteed to hold any integer type. > >Does such thing exist? Unless it is BIGINT. I'm confused here, looks like you're missing some words from those sentence

Questions about PDD 4: Internal data types

2001-03-02 Thread Hong Zhang
> Integer data types are generically referred to as Cs. There is an > C typedef that is guaranteed to hold any integer type. Does such thing exist? Unless it is BIGINT. > Should we scrap the buffer pointer and just tack the buffer on the end > of the structure? Saves a level of indirection, but