Skip to content

Comments

Workaround Issue 11497 - lambda in "static if"/"assert" prevent inlining of functio#1688

Merged
1 commit merged intodlang:masterfrom
monarchdodra:workaround11497
Nov 18, 2013
Merged

Workaround Issue 11497 - lambda in "static if"/"assert" prevent inlining of functio#1688
1 commit merged intodlang:masterfrom
monarchdodra:workaround11497

Conversation

@monarchdodra
Copy link
Collaborator

This little "trivial" change is all that is required for emplace to be always inlined at call site (regardless of -inline switch) with DMD.

This gives drastic performance improvements for the likes of array, Appender, Array.

I had to use lvalueOf!Arg instead of Arg.init, because the point of the test is to check for postblit, and Arg.init specifically bypasses it. I left in the old code, so we can revert if/when 11497 is fixed.

@ghost
Copy link

ghost commented Nov 17, 2013

Auto-merge toggled on

ghost pushed a commit that referenced this pull request Nov 18, 2013
Workaround Issue 11497 - lambda in "static if"/"assert" prevent inlining of functio
@ghost ghost merged commit 1ef2958 into dlang:master Nov 18, 2013
@monarchdodra monarchdodra deleted the workaround11497 branch December 19, 2013 18:41
This pull request was 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

Successfully merging this pull request may close these issues.

1 participant