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

Simplify internal static references by using static closure functions #123

Merged
merged 1 commit into from
Jun 11, 2018

Conversation

clue
Copy link
Member

@clue clue commented Jun 9, 2018

This PR simplifies a fair bit of the logic implemented in #115, #116 and #117 by using inline static closure functions instead of creating static closure functions by moving their creation logic to static helper methods. This removes a fair bit of duplicate boilerplate code and makes the underlying concepts somewhat more obvious. This PR does not change any of its internal logic or memory behavior, so the public behavior and tests are not affected.

Invoking the benchmarking example from #113 shows that this has little effect on performance (1M invocations show a ~4% performance improvement). Likewise, memory consumption did not change noticeably (reduced by a few kilobytes).

Refs #115, #116, #117

@clue clue added this to the v2.6.0 milestone Jun 9, 2018
@clue clue changed the title Simplify static references by using static closure functions Simplify internal static references by using static closure functions Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants