Re: Fastcode MM B&V 0.48



Hi All

I think that the "Block downsize test" benchmark does not work as intended.

It was meant to

Allocate a lot of strings of size = 20000.
Downsize them to Size=1

The benchmark did not run for long enough and somebody added a loop

for n := 1 to 50 do // loop added to have more than 1000 MTicks for this
benchmark

This changed the benchmark to do this?

Allocate a lot of strings of size = 20000.
Downsize them to Size=1
Upsize to Size = 20000
Downsize them to Size=1

etc.

What do you think?

procedure TDownsizeTest.RunBenchmark;
var
i, n, LOffset: integer;
begin
inherited;

for n := 1 to 50 do // loop added to have more than 1000 MTicks for
this benchmark
begin
{Allocate a lot of strings}
SetLength(FStrings, 50000);
for i := 0 to high(FStrings) do
begin
{Grab a 20K block}
SetLength(FStrings[i], 20000);
{Touch memory}
LOffset := 1;
while LOffset <= 20000 do
begin
FStrings[i][LOffset] := #1;
Inc(LOffset, 4096);
end;
{Reduce the size to 1 byte}
SetLength(FStrings[i], 1);
end;
{Update the peak address space usage}
UpdateUsageStatistics;
end;
end;

Regards
Dennis


.



Relevant Pages

  • Re: Fastcode MM B&V 0.39
    ... Why is this benchmark called "DownSizeTest"? ... {Allocate a lot of strings} ... in the next iteration it upsizes all strings from 1+8 byte to 20000 bytes ... This we could call upsize + downsize benchmark ...
    (borland.public.delphi.language.basm)
  • Re: Writing a Compiler: Lisp or Scheme or Haskell?
    ... and come to the conclusion that the benchmark is fair. ... keys are strings made up of the letters ACGT. ... The Lua program is straightforward code. ... I suspect they are 8 bit characters. ...
    (comp.lang.lisp)
  • Re: C or C++ do you prefer to program?
    ... STL can produce faster code then C equivalents ... but optimization never ... As it turns out, for your benchmark, reference counted strings are ...
    (comp.unix.programmer)
  • Re: Fastcode Memory Manager B&V 0.01
    ... the 2 is fast as the 1 but allocate very small memory as the rtl. ... Benchmark: NexusDB MM benchmark ... 19 free space fragments ...
    (borland.public.delphi.language.basm)
  • Re: Fastcode Memory Manager B&V 0.01
    ... 325M ticks ... 19 free space fragments ... Benchmark: ... allocation (example u have to allocate 2 MB and have 255 allocated, ...
    (borland.public.delphi.language.basm)