view .editorconfig @ 32228:112ba1c7d65d

perf: store reference to revlog._chunkraw in a local variable To prepare for renaming revlog._chunkraw, we stuff a reference to this metho in a local variable. This does 2 things. First, it moves the attribute lookup outside of a loop, which more accurately measures the time of the code being invoked. Second, it allows us to alias to different methods depending on their presence (perf.py needs to support running against old Mercurial versions). Removing an attribute lookup from a tigh loop appears to shift the numbers slightly with mozilla-central: $ hg perfrevlogchunks -c ! read ! wall 0.354789 comb 0.340000 user 0.330000 sys 0.010000 (best of 28) ! wall 0.335932 comb 0.330000 user 0.290000 sys 0.040000 (best of 30) ! read w/ reused fd ! wall 0.342326 comb 0.340000 user 0.320000 sys 0.020000 (best of 29) ! wall 0.332857 comb 0.340000 user 0.290000 sys 0.050000 (best of 30) ! read batch ! wall 0.023623 comb 0.020000 user 0.000000 sys 0.020000 (best of 124) ! wall 0.023666 comb 0.020000 user 0.000000 sys 0.020000 (best of 125) ! read batch w/ reused fd ! wall 0.023828 comb 0.020000 user 0.000000 sys 0.020000 (best of 124) ! wall 0.023556 comb 0.020000 user 0.000000 sys 0.020000 (best of 126)
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 06 May 2017 12:02:31 -0700
parents d30fdd6d1bf7
children 1d6066336d7b
line wrap: on
line source

# See http://EditorConfig.org for the specification

root = true

[*.py]
indent_size = 4
indent_style = space
trim_trailing_whitespace = true

[*.{c,h}]
indent_size = 8
indent_style = tab
trim_trailing_whitespace = true