Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » New allocator...
New allocator... [message #16093] Tue, 27 May 2008 19:46 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
After encountering the shortcomings of memory allocator in heavily multithreaded apps, I have implemented a new one (already 5th Wink.

There are two advantages:

- allocator is non-locking for in-thread allocations, only remote-free locks

- false sharing - cacheline contention - is no more a problem.

Moreover, surprisingly it is a bit faster in single-threaded apps too.

However, this is a very fragile piece of code (took me 7 days to develop those 800 lines), I have tested it in a test with one bilion allocations; anyway if you have any mission critical software, I recommend to backup Core to your app nest (so that older version will be used) (and wait a week or two Wink

Mirek
Re: New allocator... [message #16452 is a reply to message #16093] Mon, 16 June 2008 15:51 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member

I can see that my apps are faster using UPP Allocator.
Do you have somes examples and time comparisons with and without UPP Allocator ?
Re: New allocator... [message #16455 is a reply to message #16452] Mon, 16 June 2008 19:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Not much beyond this:

http://www.ultimatepp.org/www$uppweb$vsstd$en-us.html

(you can compare STL time with standard GLIBC allocator and with U++).

Mirek
Re: New allocator... [message #16456 is a reply to message #16455] Mon, 16 June 2008 19:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
P.S.: I think the new allocator is proven stable now...
Re: New allocator... [message #16470 is a reply to message #16093] Tue, 17 June 2008 08:56 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
Ok so it seems to be around 17% faster only using U++ allocator (not bad !). I have the same results with my apps. thanks
Re: New allocator... [message #16551 is a reply to message #16470] Tue, 24 June 2008 22:46 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Recently I`ve met discussion about new Google allocator. It was told that it is about 6 times faster than common one.
http://google-perftools.googlecode.com/svn/trunk/doc/tcmallo c.html

May be this could be handy, or it will be interesting to compare - just pasting link.

[Updated on: Tue, 24 June 2008 22:47]

Report message to a moderator

Re: New allocator... [message #16552 is a reply to message #16551] Wed, 25 June 2008 09:27 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Tue, 24 June 2008 16:46

Recently I`ve met discussion about new Google allocator. It was told that it is about 6 times faster than common one.
http://google-perftools.googlecode.com/svn/trunk/doc/tcmallo c.html

May be this could be handy, or it will be interesting to compare - just pasting link.


Well, at first glance it seems to me that TCMalloc just does too much Smile Certainly, they are not using our main trick - keeping management data at the beginning of small-block 4KB page...

Mirek
Previous Topic: Fixed most Win64 warnings.
Next Topic: One more sql news
Goto Forum:
  


Current Time: Wed Apr 17 01:14:05 CEST 2024

Total time taken to generate the page: 0.05687 seconds