Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test mormot.core.base.pas MoveFast speed #63

Closed
dbyoung720 opened this issue Oct 30, 2021 · 2 comments
Closed

test mormot.core.base.pas MoveFast speed #63

dbyoung720 opened this issue Oct 30, 2021 · 2 comments

Comments

@dbyoung720
Copy link

dbyoung720 commented Oct 30, 2021

I test mormot.core.base.pas MoveFast function,
this https://github.com/skywind3000/FastMemcpy.git is faster on Delphi11.
platform: Window10 x64 + VS2019

@dbyoung720 dbyoung720 changed the title test mormot.core.base.pas FastMove speed test mormot.core.base.pas MoveFast speed Oct 30, 2021
@synopse
Copy link
Owner

synopse commented Oct 31, 2021

How much faster is it?
It is likely to be faster, but this code is much more verbose, and it is written in C.

I don't see any benefit in using it for mormot.core.base in practice. Putting much more asm many not be ideal.
I doubt it may change anything on real processing, because most benchmarks are working within the cache, or tricking the CPUs. They are typical unrealistic benchmarks. Does it change anything e.g. for the multi-threading tests of our HTTP process?

Please use our forum to discuss this.
https://synopse.info/forum

@synopse synopse closed this as completed Oct 31, 2021
@synopse
Copy link
Owner

synopse commented Nov 1, 2021

Please see my remarks at https://synopse.info/forum/viewtopic.php?pid=36144#p36144

The main argument against its integration are

  1. its size: 120KB instead of 671 bytes, which pollute the CPU opcache for sure.
  2. the lower speed on small blocks, which occur very often on production code (mainly for strings).
  3. overuse of prefetch.

So please try it on mormot2tests and report back in the forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants