🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.powerpc
Article #2319

Re: Ask yourself these before you choosing a 32bit OS...

#2319
From: Kazimir Kylheku
Date: Mon, 25 Sep 1995 00:55
61 lines
3266 bytes
In article <nevin-2309950443170001@mac-nevin.cs.arizona.edu>,
Nevin ":-]" Liber <nevin@CS.Arizona.EDU> wrote:
>In article <FAT.95Sep20151221@fat.cnit.nsk.su>, fat@cnit.nsk.su (Dmitry V.
>Irtegov) wrote:
>
>> If you lock handles before each use and unlock them after,
>> your code inflates 2-3 times,
>
>Unless all your code is doing is a system call just about every line (and
>I can't think of any useful non-trival program that does this), the
>additional code is nowhere near that inflated.  A couple of percent at
>most.

That's just the static code size. What about the total count of
executed instructions? I bet that goes up quite a bit more. Each
time you have to dereference a handle, you have to execute twice
as many instructions. Chasing dynamic links becomes slower.

>> and if you don't you have werid
>> bugs when you pass pointer outside of lock/unlock region.
>
>Why aren't you passing the handle?  Micro-optimized code usually ends up
>buggier than well thought out code.  Don't do microoptimizations until you
>know there is a bottleneck.

Passing the handle means you have to do an extra dereference.

>> Been there, done that.
>
>That says more about your skill as a programmer than it does about the
>Mac's memory scheme.

Not every programmer wants to go through blockhead exercises that have
nothing to do with the computing task.

>> Handle memory management is crap 
>> and nobody can convince me otherwise.
>
>That says more about you being a close-minded person than it does about
>the Mac's memory scheme.

I too second that handle based memory management is crap.  Knuth says
it's crap in The Art of Computer Programming, though in more scholarly
terms. This week, I'm going to dig up the precise quote.

I wouldn't say that I am closed-minded person. Hell, I implemented the
crap myself, foolishly thinking that heap compaction would be neat!
After all, memory is a precious resource with which one must be
very frugal. Once you use it up, ain't none left!

After I saw what my favourite list, B+tree and hash-table module turned
into when converted to use double indirection, I erased the project at
once!  I went to the library and pulled out Knuth, which at once set me
straight.

When I first found out that the Mac uses handle-based memory management, 
I laughed so hard that my buttons just about flew off my shirt. Though
it's no laughing matter if you ever have to work with it.
-- 
PGP key id is 0xD3C7995D.
Molybdenum 95! Got your ounce of fission byproduct yet?
Technical Details
Message-ID: <444ulgINN1bp@keats.ugrad.cs.ubc.ca>
Path: arc1-ca.pugleaf.net!keats.ugrad.cs.ubc.ca!not-for-mail
References: <3vh2hc$9dd@falcon.ccs.uwo.ca> <wade-1809952212460001@f182-067.net.wisc.edu> <FAT.95Sep20151221@fat.cnit.nsk.su> <nevin-2309950443170001@mac-nevin.cs.arizona.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!keats.ugrad.cs.ubc.ca!not-for-mail
From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel,comp.os.ms-windows.advocacy
Subject: Re: Ask yourself these before you choosing a 32bit OS...
Date: 24 Sep 1995 17:55:12 -0700
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Message-ID: <444ulgINN1bp@keats.ugrad.cs.ubc.ca>
References: <3vh2hc$9dd@falcon.ccs.uwo.ca> <wade-1809952212460001@f182-067.net.wisc.edu> <FAT.95Sep20151221@fat.cnit.nsk.su> <nevin-2309950443170001@mac-nevin.cs.arizona.edu>
NNTP-Posting-Host: keats.ugrad.cs.ubc.ca