public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20162] New: new/delete performance versus std::allocator
@ 2005-02-23 17:11 sylvain dot pion at sophia dot inria dot fr
  2005-02-23 17:13 ` [Bug c++/20162] " sylvain dot pion at sophia dot inria dot fr
  2005-02-23 17:21 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2005-02-23 17:11 UTC (permalink / raw)
  To: gcc-bugs

I do not understand why new/delete is slower than std::allocator.
Is there a fundamental reason why it is so ?

The benchmark program attached gives the following timing for series
of new/delete versus std::allocator allocations/deallocations.

                  new/delete   std::allocator
 g++ 3.3.2 -O3 :   2.45 s       1.56 s
 g++ 3.4.3 -O3 :   2.25 s       2.24 s
 g++ 4.0.0 -O3 :   2.13 s       1.30 s

-- 
           Summary: new/delete performance versus std::allocator
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sylvain dot pion at sophia dot inria dot fr
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

* [Bug c++/20162] new/delete performance versus std::allocator
  2005-02-23 17:11 [Bug c++/20162] New: new/delete performance versus std::allocator sylvain dot pion at sophia dot inria dot fr
@ 2005-02-23 17:13 ` sylvain dot pion at sophia dot inria dot fr
  2005-02-23 17:21 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2005-02-23 17:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sylvain dot pion at sophia dot inria dot fr  2005-02-23 14:03 -------
Created an attachment (id=8262)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8262&action=view)
Benchmark program to compare new/delete to std::allocator


-- 


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


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

* [Bug c++/20162] new/delete performance versus std::allocator
  2005-02-23 17:11 [Bug c++/20162] New: new/delete performance versus std::allocator sylvain dot pion at sophia dot inria dot fr
  2005-02-23 17:13 ` [Bug c++/20162] " sylvain dot pion at sophia dot inria dot fr
@ 2005-02-23 17:21 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-23 17:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-23 14:11 -------
operator new/delete just calls malloc/free which is controled by libc in your case glibc, try with malloc/
free and then report a bug to glibc.

std::allocate is a sub allocator really.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2005-02-23 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23 17:11 [Bug c++/20162] New: new/delete performance versus std::allocator sylvain dot pion at sophia dot inria dot fr
2005-02-23 17:13 ` [Bug c++/20162] " sylvain dot pion at sophia dot inria dot fr
2005-02-23 17:21 ` pinskia at gcc dot gnu dot org

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).