]> Sergey Matveev's repositories - btrtrc.git/commit
PieceStateRuns: reduce copying and make inlineable
authorYenForYang <YenForYang@users.noreply.github.com>
Wed, 1 Sep 2021 04:06:25 +0000 (23:06 -0500)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 1 Sep 2021 04:51:45 +0000 (14:51 +1000)
commitcce8c150c20e6bd7c5751036ec7edc1838591bb1
tree073b7b98ea1a4086465aa182bd9a06e20ec8600d
parentbf6e64a652d7d6c48328558794d23010cefd55f9
PieceStateRuns: reduce copying and make inlineable

Just a heads up: using `range` and/or `defer` prevents function inlining. This is fine for infrequently called functions and/or large functions, but for simple public methods like these, I'd assume it's better for them to be inlined.
t.go