Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@boyter
Copy link
Owner

@boyter boyter commented Jan 9, 2019

Modify scc to only load language features as required rather then doing all 222 in a single pass.
Since the loading of features is a fairly heavy task the savings for the majority of cases is worth it.
This is especially noticeable when working on smaller repositories.

Version 2.1.0 (with the update) vs 2.0.0 with the full load.

$ hyperfine './scc redis-5.0.2' && hyperfine 'scc redis-5.0.2'
Benchmark #1: ./scc redis-5.0.2

  Time (mean ± σ):      81.6 ms ±   5.0 ms    [User: 173.8 ms, System: 265.4 ms]

  Range (min … max):    75.5 ms …  97.1 ms

Benchmark #1: scc redis-5.0.2

  Time (mean ± σ):     124.4 ms ±   2.4 ms    [User: 168.6 ms, System: 289.1 ms]

  Range (min … max):   120.0 ms … 128.4 ms

NB this should be backwards compatible with library users as it is only enabled via the main.go file.

@boyter boyter requested a review from dbaggerman January 9, 2019 06:45
Copy link
Collaborator

@dbaggerman dbaggerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@boyter boyter merged commit 35560c3 into master Jan 9, 2019
@boyter boyter deleted the LazyLoading branch January 9, 2019 10:04
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.

2 participants