Recent

Author Topic: The Alioth Benchmark Game  (Read 4833 times)

Nitorami

  • Sr. Member
  • ****
  • Posts: 481
The Alioth Benchmark Game
« on: February 02, 2018, 06:25:33 pm »
In the alioth "benchmark game" https://benchmarksgame.alioth.debian.org/ , the performance of FPC for the "binary tree" test is very poor: FPC 36.4 secs vs. C++ 2.55 secs. The test is all about allocating and deallocating atomic chunks of memory, and the code provided does this rather inefficiently by calls to GetMem()/FreeMem().

I now added memory pooling, using unit pooledmm, which decreased runtime by approximately factor 5. Then added threading support (unit mtpocs), but the performance went down dramatically. Obviously the standard memory manager performs rather poorly for this test case. But when using cmem, the code runs approximately 8-10 x faster than the original. This is all under windows.

Can someone please test this with Lazarus 64bit under linux, preferrably on a quad core machine ? With argument 21, the runtime should be below 5 seconds.

Note: Run the exe from a shell, because performance is VERY poor when running inside the Lazarus IDE (at least unter windows).

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: The Alioth Benchmark Game
« Reply #1 on: February 03, 2018, 04:10:04 am »
Using the following options:
-CX -XXs -O4 -OpCOREAVX2 -CfAVX2

The original code runs in:
real   0m17,918s
user   0m17,402s
sys   0m0,517s

while your mod runs in:
real   0m2,527s
user   0m8,277s
sys   0m0,070s

so roughly 7 times faster, with around 100 ms variance.
« Last Edit: February 03, 2018, 04:12:37 am by Leledumbo »

Nitorami

  • Sr. Member
  • ****
  • Posts: 481
Re: The Alioth Benchmark Game
« Reply #2 on: February 03, 2018, 09:48:49 am »
Thanks Leledumbo. I will submit this code then.

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: The Alioth Benchmark Game
« Reply #3 on: March 16, 2018, 02:33:48 pm »
This still hasn't shown up on the benchmark website, by the way. Still shows the slow 36 second one.

Edit: Is it possibly because MTProcs is only available with Lazarus? It seems quite unlikely that the person who tests the benchmarks is specifically using Lazarus to build the Pascal ones. You'd probably want to include a copy of it and its dependent units with the program file to ensure they were able to compile it.
« Last Edit: March 16, 2018, 02:45:17 pm by Akira1364 »

Nitorami

  • Sr. Member
  • ****
  • Posts: 481
Re: The Alioth Benchmark Game
« Reply #4 on: March 16, 2018, 02:54:01 pm »
No, the reason is I haven't submitted it yet. It requires you to register, fill in a form etc etc and I've simply been too lazy to do it.

Edit 5/03/2019: I have still not submitted it so if you would like to do it, go ahead. I have no objections.
« Last Edit: March 05, 2019, 09:11:33 pm by Nitorami »

 

TinyPortal © 2005-2018