public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/26424]  New: tr1/unordered vs 64-bit machines
@ 2006-02-22 16:56 pcarlini at suse dot de
  2006-02-22 17:12 ` [Bug libstdc++/26424] " falk at debian dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2006-02-22 16:56 UTC (permalink / raw)
  To: gcc-bugs

The number of buckets is currently limited to ~2^32 (see X<>::primes). This is
a serious issue: for correctness, rehash(n) for n > 2^32 should throw and do
nothing, in order not to violate the post-conditions in Table 21.

We have various options: as suggested by Howard off-line, we could well compute
at run-time prime-numbers. Otherwise, mid-term, if we cannot extend the maximum
number of bucket we have to add throws to the rehashing functions.


-- 
           Summary: tr1/unordered vs 64-bit machines
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcarlini at suse dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libstdc++/26424] tr1/unordered vs 64-bit machines
  2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
@ 2006-02-22 17:12 ` falk at debian dot org
  2006-02-22 17:23 ` pcarlini at suse dot de
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: falk at debian dot org @ 2006-02-22 17:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from falk at debian dot org  2006-02-22 17:11 -------
Just curious: is the assumption of prime-size buckets hardwired in the TR?
Otherwise, the obvious alternative would be to use power-of-two sizes, which
are much faster in access.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libstdc++/26424] tr1/unordered vs 64-bit machines
  2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
  2006-02-22 17:12 ` [Bug libstdc++/26424] " falk at debian dot org
@ 2006-02-22 17:23 ` pcarlini at suse dot de
  2006-02-22 18:01 ` pcarlini at suse dot de
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2006-02-22 17:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pcarlini at suse dot de  2006-02-22 17:23 -------
(In reply to comment #1)
> Just curious: is the assumption of prime-size buckets hardwired in the TR?
> Otherwise, the obvious alternative would be to use power-of-two sizes, which
> are much faster in access.

Yes. Really, I have yet to study the issue in detail (Knuth...), I'm going to
do that. For sure TR1 doesn't mandate a specific policy, but we have got a
default policy, prime_rehash_policy, which is definitely well known and used
elsewhere, it would be nice to fix it, to begin with ;)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libstdc++/26424] tr1/unordered vs 64-bit machines
  2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
  2006-02-22 17:12 ` [Bug libstdc++/26424] " falk at debian dot org
  2006-02-22 17:23 ` pcarlini at suse dot de
@ 2006-02-22 18:01 ` pcarlini at suse dot de
  2006-04-19 10:49 ` pcarlini at suse dot de
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2006-02-22 18:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pcarlini at suse dot de  2006-02-22 18:01 -------
... something considered "obvious" in the literature is that the size policy
goes together with the range-hashing function: e.g., an exponential size-policy
would not work well together with our default modulo range-hashing function.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libstdc++/26424] tr1/unordered vs 64-bit machines
  2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
                   ` (2 preceding siblings ...)
  2006-02-22 18:01 ` pcarlini at suse dot de
@ 2006-04-19 10:49 ` pcarlini at suse dot de
  2006-04-19 22:58 ` paolo at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2006-04-19 10:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pcarlini at suse dot de  2006-04-19 10:49 -------
Working on it.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-04-19 10:49:52
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libstdc++/26424] tr1/unordered vs 64-bit machines
  2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
                   ` (3 preceding siblings ...)
  2006-04-19 10:49 ` pcarlini at suse dot de
@ 2006-04-19 22:58 ` paolo at gcc dot gnu dot org
  2006-04-19 23:06 ` pcarlini at suse dot de
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paolo at gcc dot gnu dot org @ 2006-04-19 22:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from paolo at gcc dot gnu dot org  2006-04-19 22:58 -------
Subject: Bug 26424

Author: paolo
Date: Wed Apr 19 22:58:23 2006
New Revision: 113100

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113100
Log:
2006-04-19  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/26424
        * include/tr1/hashtable (X<>::primes): Extend for 64-bit machines.
        (X<>::n_primes): Adjust.
        (prime_rehash_policy::next_bkt, bkt_for_elements, need_rehash): Adjust.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/tr1/hashtable


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libstdc++/26424] tr1/unordered vs 64-bit machines
  2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
                   ` (4 preceding siblings ...)
  2006-04-19 22:58 ` paolo at gcc dot gnu dot org
@ 2006-04-19 23:06 ` pcarlini at suse dot de
  2006-04-21 17:50 ` paolo at gcc dot gnu dot org
  2006-04-21 17:52 ` pcarlini at suse dot de
  7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2006-04-19 23:06 UTC (permalink / raw)
  To: gcc-bugs



-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libstdc++/26424] tr1/unordered vs 64-bit machines
  2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
                   ` (5 preceding siblings ...)
  2006-04-19 23:06 ` pcarlini at suse dot de
@ 2006-04-21 17:50 ` paolo at gcc dot gnu dot org
  2006-04-21 17:52 ` pcarlini at suse dot de
  7 siblings, 0 replies; 9+ messages in thread
From: paolo at gcc dot gnu dot org @ 2006-04-21 17:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from paolo at gcc dot gnu dot org  2006-04-21 17:50 -------
Subject: Bug 26424

Author: paolo
Date: Fri Apr 21 17:49:48 2006
New Revision: 113143

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113143
Log:
2006-04-21  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/26424
        * include/tr1/hashtable (X<>::primes): Extend for 64-bit machines.
        (X<>::n_primes): Adjust.
        (prime_rehash_policy::next_bkt, bkt_for_elements, need_rehash): Adjust.

Modified:
    branches/gcc-4_1-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_1-branch/libstdc++-v3/include/tr1/hashtable


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libstdc++/26424] tr1/unordered vs 64-bit machines
  2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
                   ` (6 preceding siblings ...)
  2006-04-21 17:50 ` paolo at gcc dot gnu dot org
@ 2006-04-21 17:52 ` pcarlini at suse dot de
  7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2006-04-21 17:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pcarlini at suse dot de  2006-04-21 17:51 -------
Fixed for 4.1.1.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26424


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-04-21 17:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-22 16:56 [Bug libstdc++/26424] New: tr1/unordered vs 64-bit machines pcarlini at suse dot de
2006-02-22 17:12 ` [Bug libstdc++/26424] " falk at debian dot org
2006-02-22 17:23 ` pcarlini at suse dot de
2006-02-22 18:01 ` pcarlini at suse dot de
2006-04-19 10:49 ` pcarlini at suse dot de
2006-04-19 22:58 ` paolo at gcc dot gnu dot org
2006-04-19 23:06 ` pcarlini at suse dot de
2006-04-21 17:50 ` paolo at gcc dot gnu dot org
2006-04-21 17:52 ` pcarlini at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).