Skip to content

Conversation

DmitryOlshansky
Copy link
Member

On Win32 allocating large blocks (>512K) is forwarded to
VirtualAlloc/VirtualFree. Doing these calls is expensive especially in a
loop. As a temporary solution a block size of a segmented stack is
decreased to ~1/8 of critical size.

The code needs to be adapted once allocators are in std.

On Win32 allocating large blocks (>512K) is forwarded to
VirtualAlloc/VirtualFree. Doing these calls is expensive especially in a
loop. As a temporary solution a block size of a segmented stack is
decreased to ~1/8 of critical size.

The code needs to be adapted once allocators are in std.
@DmitryOlshansky
Copy link
Member Author

@Poita
Copy link
Contributor

Poita commented Feb 3, 2014

Gives a significant boost on OS X 64-bit as well:

Before: ct = 40015 msecs, rt = 3335
After: ct = 1146 msecs, rt = 3221

LGTM

@DmitryOlshansky
Copy link
Member Author

That is 40 seconds with C-T ?! Bloody hell...

WalterBright added a commit that referenced this pull request Feb 3, 2014
@WalterBright WalterBright merged commit 9089081 into dlang:master Feb 3, 2014
@AndrewEdwards AndrewEdwards self-assigned this Feb 3, 2014
WalterBright added a commit that referenced this pull request Feb 3, 2014
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

Successfully merging this pull request may close these issues.

4 participants