Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
45 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters