Adding Java and C++ to the MQTT benchmarks or: How I Learned to Stop Worrying and Love the Garbage Collector

Paulo Pinto pjmlp at progtools.org
Thu Jan 9 01:49:15 PST 2014


On Thursday, 9 January 2014 at 09:38:31 UTC, Ola Fosheim Grøstad 
wrote:
> On Thursday, 9 January 2014 at 09:10:07 UTC, Paulo Pinto wrote:
>> I have only seen those things work in small AAA class teams.
>
> But you have probably seen c programs allocate a bunch of 
> different small structs with a single malloc where it is known 
> that they will be freed in the same location? A compiler needs 
> whole program analysis to do the same.
>
> So yes, c programs will have fewer allocs if the programmer 
> cared.

Yes, I did.

Not much different than memory pools in Turbo Pascal and 
Objective-C for that matter.

And even more strange things, where the whole memory gets 
allocated at start, then some "handles" are used with mysterious 
macros to convert back and forth to real pointers.

I have also seen lots of other storage tricks that go easily out 
of control when the team either grows over a certain size, or 
management decides to outsource part of the development or 
lowering the expected skill set of new team members.

Then you watch the older guys playing fire brigade to track down 
issues of release X.Y.Z at customer site, almost every week.


--
Paulo


More information about the Digitalmars-d mailing list