#1 2024-10-15 18:19:21

zen010101
Member
Registered: 2024-06-15
Posts: 66

lang-cmp example result vs. go version

I compiled the mormot version and the go version, and the following are the latest test results. I'm surprised that the Go language version has improved so quickly.

https://gist.githubusercontent.com/syno … tfile1.txt

CPU: Intel(R) Core(TM) Ultra 9 185H
RAM: 32G
OS: Windows 11 23H2

Offline

#2 2024-10-15 20:38:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,657
Website

Re: lang-cmp example result vs. go version

Which compiler did you use?
Win64 as target, I hope?

AFAICT the previous results were done on Linux, not Windows.
It makes a huge performance difference for the async web server.
Note that even 1.0 GB/s is 8Gb/s so would fill any existing network interface for real process.

I am also curious about the memory and CPU consumption during the run.

Offline

#3 2024-10-16 03:42:46

zen010101
Member
Registered: 2024-06-15
Posts: 66

Re: lang-cmp example result vs. go version

ab wrote:

Which compiler did you use?
Win64 as target, I hope?

Yes, Win64 as target, using FPC trunk compiler.

Here is the result running in the same host but in Windows WSL ( Ubuntu ):
https://gist.githubusercontent.com/syno … tfile1.txt

Offline

#4 2024-10-16 03:55:59

zen010101
Member
Registered: 2024-06-15
Posts: 66

Re: lang-cmp example result vs. go version

Real metal machine result: Ubuntu, Intel Core i5-1155G7 with 16G RAM

https://gist.githubusercontent.com/syno … tfile1.txt

Offline

#5 2024-10-16 07:11:00

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,657
Website

Re: lang-cmp example result vs. go version

Very interesting.
(I took the liberty to move the tables to gists, to leverage our Synopse server)
So we are faster on Core i5.

My guess is that the Go http server is able to use more aggressively the CPU cores of the machine.
Go takes 4 times more CPU on WSL than Pascal, and 2 times more CPU on the Core i5.
It may depend also on how the benchmark is done. Probably not very realistic.

One detail is that we use a binary search to find the information, for simplicity of code.
We may switch to a hashed index, as Go is doing. The data retrieval complexity would pass from O(log(n)) to O(1).

The fun fact is that Go consumes more than 10 times memory than our Pascal version - always.

Offline

#6 2024-10-16 07:19:13

zen010101
Member
Registered: 2024-06-15
Posts: 66

Re: lang-cmp example result vs. go version

You summed it up so right. So, mORMot is awesome!

Offline

Board footer

Powered by FluxBB