December 10, 2006
Pragma wrote:
> zz wrote:
>> Pragma wrote:
>>> zz wrote:
>>>
>>>
>>> While I'm no STL guru, I have to ask: which allocator were you using with ptr_vector?
>>>
>> For the first number we used VS2003 SMT CRT (Default allocator)
>> With the other test we used nedmalloc as the allocator (just over load new and delete in C++ (it's a c library).
>>
>> http://www.nedprod.com/programs/portable/nedmalloc/
> 
> Wow.  Well that explains it then.
> 
> Sean, you should seriously check this thing out.  Maybe this could be
> adapted to be used in Ares?

It shouldn't be too hard to create a D wrapper for it, but converting it to a garbage collector would be non-trivial.  It may be best to simple offer it as an add-on package for folks who really need that extra bit of performance.


Sean
December 10, 2006
Sean Kelly wrote:
> It shouldn't be too hard to create a D wrapper for it, but converting it to a garbage collector would be non-trivial.  It may be best to simple offer it as an add-on package for folks who really need that extra bit of performance.
> 
I couldn't get NedMalloc to compile under DMC but dlmalloc which nedmalloc uses compiled and the results I got from some c code were like 1:5.
I wonder what would happen if dlmalloc was used as the base allocator in Ares or Phobos, would there be any improvement? (I just messed thing up when playing with phobos but will look into it again as for Ares the dsource site seems to be having problems).

Zz

December 10, 2006
zz wrote:
> I wonder what would happen if dlmalloc was used as the base allocator in Ares or Phobos, would there be any improvement? (I just messed thing up when playing with phobos but will look into it again as for Ares the dsource site seems to be having problems).

For Phobos, I don't think it would make much of a difference. AFAICT it doesn't use malloc at all, except for COM objects. It requests pages directly from the OS instead.
So unless you use a lot of COM objects the difference will be negligible.
IIRC Ares uses essentially the same GC so the same would apply.
December 10, 2006
Frits van Bommel wrote:
> zz wrote:
> 
>> I wonder what would happen if dlmalloc was used as the base allocator in Ares or Phobos, would there be any improvement? (I just messed thing up when playing with phobos but will look into it again as for Ares the dsource site seems to be having problems).
> 
> 
> For Phobos, I don't think it would make much of a difference. AFAICT it doesn't use malloc at all, except for COM objects. It requests pages directly from the OS instead.
> So unless you use a lot of COM objects the difference will be negligible.
> IIRC Ares uses essentially the same GC so the same would apply.

Thanks for the clarification, it's a gray area for me.

I noticed a few calls to std.c.stdlib.malloc and family then assumed that something done at that level may make some difference.

Zz
December 11, 2006
clayasaurus wrote:
> Pragma wrote:
>> Something I ran into that the group might enjoy:
>>
>> From: http://www.techreview.com/InfoTech/17831/
>>
>> "Bjarne Stroustrup, the inventor of the C++ programming language, defends his legacy and examines what's wrong with most software code."
>>
>> As always, Slashdot has some colorful coverage on this:
>>
>> http://it.slashdot.org/it/06/12/05/0045234.shtml
>>
>> "MIT's Technology Review has a Q&A with C++ inventor Bjarne Stroustrup. Highlights include Bjarne's answers on the trade-offs involved in the design of C++, and how they apply today, and his thoughts on the solution to the problems. From the interview: 'Software developers have become adept at the difficult art of building reasonably reliable systems out of unreliable parts. The snag is that often we do not know exactly how we did it.'"
>>
> 
> Here is the follow up interview
> 
> http://www.techreview.com/InfoTech/17868/page1/
> 
> http://developers.slashdot.org/article.pl?sid=06/12/09/220218
> 

Reading that, it has just sprung in my mind that Bjarne's initials spell BS... ;P

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
1 2 3 4 5 6 7
Next ›   Last »