🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #5610

Re: Macintosh C comparisons?

#5610
From: gus
Date: Tue, 29 Apr 1986 10:18
23 lines
1816 bytes
> does the fact that Lightspeed C programs do not work well under heap
> scramble imply that their memory management routines are buggy?

Not exactly buggy, but slow. I am doing a benchmark on various C compilers.
Although the final results aren't in yet, one thing is clear. Calls to malloc
should NOT translate directly into Mac memory manager calls. Aztec,
Lightspeed, and Consulair do this while Megamax and Lisa Workshop C have
a two-stage malloc. As a result, 5,000 element treesort takes about 300
seconds on the former set and 5 seconds on the latter. Lightspeed has 
two sets of storage allocation routines. The first set (malloc, free) 
take linear time to execute in the number of consecutive calls, while
the second set (getmem, freemem) exhibit the constant time performance which
allows treesort to work at the expected n log n speed.

Now some might say that you really shouldn't be using standard C routines 
for Mac code. The storage allocation primitives, however, are arguably
an exception which should not be overlooked. These routines SHOULD be
optimized to be as fast as possible and still use the Mac heap architecture.
The best way to do this is to provide a two-level memory allocation heirarchy
which allocates LARGE blocks from the memory manager, and splits these up
into small blocks as requested by the user.

							Gus Fernandez
Technical Details
Message-ID: <464@Shasta>
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!hao!hplabs!hpda!hpisoa2!hpitg!Shasta!gus@Shasta
References: <2392@decwrl>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!hao!hplabs!hpda!hpisoa2!hpitg!Shasta!gus@Shasta
From: gus@Shasta
Newsgroups: net.micro.mac
Subject: Re: Macintosh C comparisons?
Message-ID: <464@Shasta>
Date: Tue, 29-Apr-86 06:18:00 EDT
Article-I.D.: Shasta.464
Posted: Tue Apr 29 06:18:00 1986
Date-Received: Wed, 14-May-86 19:22:12 EDT
References: <2392@decwrl>
Lines: 23