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

Deferred epoch initialization #37

Merged
merged 1 commit into from May 14, 2017

Conversation

@kvark
Copy link
Owner

commented May 13, 2017

Fixes #29
Our create function is pretty lightweight now: checking a few conditions and adding a single reference. No locking or other heavy operations.

Performance before:

     Running target/release/deps/ecs_pos_vel-7c237e2b0cc65da2
test bench_build  ... bench:     851,896 ns/iter (+/- 140,450)
test bench_update ... bench:       9,533 ns/iter (+/- 1,672)
     Running target/release/deps/sc_graph-db013b6502f79d2b
test bench_build  ... bench:     486,189 ns/iter (+/- 17,393)
test bench_update ... bench:       1,895 ns/iter (+/- 176)

After:

     Running target/release/deps/ecs_pos_vel-7c237e2b0cc65da2
test bench_build  ... bench:     585,123 ns/iter (+/- 122,336)
test bench_update ... bench:       9,046 ns/iter (+/- 919)
     Running target/release/deps/sc_graph-db013b6502f79d2b
test bench_build  ... bench:     447,402 ns/iter (+/- 52,071)
test bench_update ... bench:       2,287 ns/iter (+/- 282)

Looks like a solid win (1.5x on ecs_pos_vel).

src/lib.rs Outdated
fun(&mut *pending)
}

/// Wait for all the pending updates.
pub fn wait(&mut self) {
/// Syncrhonize for all the pending updates.

This comment has been minimized.

Copy link
@vitvakatu

vitvakatu May 13, 2017

Collaborator

typo

This comment has been minimized.

Copy link
@vitvakatu

vitvakatu May 13, 2017

Collaborator

inline?

@kvark kvark force-pushed the epoch branch from 7eaf447 to 032dadf May 14, 2017

@kvark

This comment has been minimized.

Copy link
Owner Author

commented May 14, 2017

Thanks, fixed!

@kvark kvark merged commit 9b44147 into master May 14, 2017

2 checks passed

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

@kvark kvark deleted the epoch branch May 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.