News for hackers. Stuff that matters.
Re:Increasing the D Compiler Speed by Over 75% by aidenn0 on Thursday July 25, 2013 @04:33PM (#6104790)
A lot of people underestimate the performance impact of malloc(). It is dog slow. In addition if you use a poor malloc() implementation heavily with varying sized data, you can easily end up using more memory than had you used a copying GC!
Re:Increasing the D Compiler Speed by Over 75% by haberman on Thursday July 25, 2013 @04:57PM (#6104932)
Not only is it slow, many malloc() implementations (like even in glibc, I think) take a global lock, so they are prone to contention when called concurrently. Other mallocs (like tcmalloc and Hoard) satisfy small allocations from a thread-local pool.
Re:Increasing the D Compiler Speed by Over 75% by scott_s on Thursday July 25, 2013 @05:28PM (#6105124)
glibc's malloc has actually been decent with regards to concurrent memory allocation for a while now, in my experience. I googled around, and found someone talking about glibc's malloc not using a global lock: http://siddhesh.in/journal/2012/10/24/malloc-per-thread-aren...
Re:Increasing the D Compiler Speed by Over 75% by haberman on Thursday July 25, 2013 @08:44PM (#6105952)
Thanks for the info; good to know that glibc has improved in this regard. I'd correct my comment but it's no longer editable. :/
Re:Increasing the D Compiler Speed by Over 75% by WalterBright on Thursday July 25, 2013 @04:40PM (#6104827)
I've seen a number of compiler "benchmark" programs that inadvertently measured the performance of malloc, not the generated code.
Re:Increasing the D Compiler Speed by Over 75% by wicknicks on Thursday July 25, 2013 @04:41PM (#6104830)
Very interesting. Do you have any URLs or papers that go into more depth regarding your statement?
Re:Increasing the D Compiler Speed by Over 75% by marshray on Thursday July 25, 2013 @08:33PM (#6105904)
malloc() hasn't been a subject of interest to academics in many decades. This knowledge pre-dates the web in some cases. Do a web search for the replacement allocator used in Firefox. You'll probably find some good discussion there.

Plus, every OS, C runtime, and usage pattern is different. YMMV massively depending on everything.

Re:Increasing the D Compiler Speed by Over 75% by scott_s on Friday July 26, 2013 @12:25AM (#6106601)
Concurrent memory allocation had some interest in the past decade - I did work in it, as did some others.