delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/03/09/00:28:05

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Message-ID: <3C899C3E.89FEA7AF@yahoo.com>
Date: Sat, 09 Mar 2002 00:23:10 -0500
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Malloc/free DJGPP code
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020306075843 DOT 28198F-100000 AT is> <3C895AC1 DOT C4E06221 AT yahoo DOT com>
Reply-To: djgpp-workers AT delorie DOT com

CBFalconer wrote:
> 
... snip ...
> 
> At any rate, I finally have some confidence that nmalloc and pals
> is functional, at least sufficiently to start some real world
> tests.

Now I have simply linked it into the system that started this
investigation.  Results below:

[1] c:\c\hashlib>timerun hashtest 4 40000
Timer 3 on:  0:03:38
HASHLIB test04

New table, inserting 40000 values
Status: Entries=40000, Deleted=0, Probes=197438, Misses=100614

Walking returned 0
       0 items were inserted 0 times
   40000 items were inserted 1 times
       0 items were inserted 2 times
       0 items were inserted 3 times
       0 items were inserted 4 times
       0 items were inserted 5 times
       0 items were inserted 6 times
       0 items were inserted 7 times
       0 items were inserted 8 times
       0 items were inserted 9 or more times

Timer 3 off:  0:04:03  Elapsed: 0:00:24.93

[1] c:\c\hashlib>timerun hshtestp 4 40000
Timer 3 on:  0:04:18
HASHLIB test04

New table, inserting 40000 values
Status: Entries=40000, Deleted=0, Probes=197438, Misses=100614

Walking returned 0
       0 items were inserted 0 times
   40000 items were inserted 1 times
       0 items were inserted 2 times
       0 items were inserted 3 times
       0 items were inserted 4 times
       0 items were inserted 5 times
       0 items were inserted 6 times
       0 items were inserted 7 times
       0 items were inserted 8 times
       0 items were inserted 9 or more times

Timer 3 off:  0:04:21  Elapsed: 0:00:03.35

[1] c:\c\hashlib>

The hashtest run is with the original library.  hshtestp is the
same object code, just adding in a link of the malloc module. 
These runs release 40,000 items at completion.  The following run
suppresses the final release, so the time difference is that spent
in free.

[1] c:\c\hashlib>timerun hshtestp 4 40001
Timer 3 on:  0:10:33
HASHLIB test04

New table, inserting 40001 values
Status: Entries=40001, Deleted=0, Probes=197441, Misses=100616

Walking returned 0
       0 items were inserted 0 times
   40001 items were inserted 1 times
       0 items were inserted 2 times
       0 items were inserted 3 times
       0 items were inserted 4 times
       0 items were inserted 5 times
       0 items were inserted 6 times
       0 items were inserted 7 times
       0 items were inserted 8 times
       0 items were inserted 9 or more times
Suppressing hshkill()

Timer 3 off:  0:10:36  Elapsed: 0:00:02.97

The free time has been cut from about 23 seconds to about 0.38
seconds, and is now O(n) rather than O(n**2).  Measurements of the
main program runtime, which is NOT dominated by the malloc time,
seems to indicate a loss of about 0.1 to 0.2 seconds in allocating
the 40,000 items.  i.e. the new is slightly slower at present.  It
is inlining very little.

I am encouraged that the malloc.o module seems to run correctly on
this first real system trial.

-- 
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net)
   Available for consulting/temporary embedded and systems.
   (Remove "XXXX" from reply address. yahoo works unmodified)
   mailto:uce AT ftc DOT gov  (for spambots to harvest)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019