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

Make de-generics wrappers for open and save_buffer #518

Merged
merged 1 commit into from Mar 31, 2016

Conversation

Projects
None yet
2 participants
@bluss
Contributor

bluss commented Mar 30, 2016

This makes the inner parts of these functions non-inlinable. It also
makes open_impl and save_buffer_impl be compiled once, as part of
compiling the crate, instead of having to compile them each time their
uses are compiled.

This was prompted by http://stackoverflow.com/questions/36317461/

Modifying the user library and recompiling took more than 20 seconds,
with this change, only < 0.3 s. This means that open's implementation
may no longer be inlined, but it shouldn't matter.

Make de-generics wrappers for open and save_buffer
This makes the inner parts of these functions non-inlinable. It also
makes open_impl and save_buffer_impl be compiled once, as part of
compiling the crate, instead of having to compile them each time their
*uses* are compiled.
@bluss

This comment has been minimized.

Show comment
Hide comment
@bluss

bluss Mar 30, 2016

Contributor

libstd uses this “pattern” in a few places too.

Contributor

bluss commented Mar 30, 2016

libstd uses this “pattern” in a few places too.

@bluss

This comment has been minimized.

Show comment
Hide comment
@bluss

bluss Mar 30, 2016

Contributor

load could use the same kind of transformation I think, but you that know the library well need to make the call there.

Contributor

bluss commented Mar 30, 2016

load could use the same kind of transformation I think, but you that know the library well need to make the call there.

@bvssvni

This comment has been minimized.

Show comment
Hide comment
@bvssvni

bvssvni Mar 31, 2016

Member

Nice!

Member

bvssvni commented Mar 31, 2016

Nice!

@bvssvni bvssvni merged commit 2e2e36d into PistonDevelopers:master Mar 31, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bluss bluss deleted the bluss:degeneric branch Mar 31, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment