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

Speed up digest with recursive hash #320

Merged
merged 1 commit into from Jun 21, 2016
Merged

Commits on Jun 21, 2016

  1. Speed up digest with recursive hash

    Digest is the second most time spent while compiling assets on the first run for CodeTriage. The `if/elsif` means that for complex data structures many many comparisons are made. Instead we store the logic of digesting each class in a hash with the class name as a key. Complex data types digest themselves by recursively calling into the hash.
    
    Is it faster?
    
    On CodeTriage.com over 50 runs against this codebase and master it averaged 12.54s per run on this branch stdev 0.27seconds and against master it was 14.9s with a 2.045 stdev. So in the average case it makes asset generation 16% faster.
    schneems committed Jun 21, 2016
    Copy the full SHA
    94a1207 View commit details
    Browse the repository at this point in the history