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

Question for optimisation code #60

Open
mlcvista opened this issue Oct 11, 2018 · 3 comments
Open

Question for optimisation code #60

mlcvista opened this issue Oct 11, 2018 · 3 comments

Comments

@mlcvista
Copy link

mlcvista commented Oct 11, 2018

Hello,

I've see in fastmm4.pas code a line (12167) like :

procedure AppendMemorySize(ASize: NativeUInt);
begin
if ASize < 10*1024 then….

I Wonder if this could be replcaced by

procedure AppendMemorySize(ASize: NativeUInt);
begin
if ASize < 10240 then…

That should be more faster… If it's correct can we Apply this to other case like this one… ?
(ex : 10x1024x1024 replaced by 10485760...)

With best regards,
MLCVISTA

@mahotilo
Copy link

There is no need to do this. The compiler will perform this optimization. You can check it at the breakpoint in the CPU view. But since the code is more convenient for reading and understanding.

@mlcvista
Copy link
Author

Big thank you Maholito 👍

@baka0815
Copy link

baka0815 commented Nov 8, 2018

I think this can be closed.

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

3 participants