Details
Details
- Reviewers
durin42 - Group Reviewers
hg-reviewers - Commits
- rHGcf2e2a7399bc: bdiff: handle the possibility of an integer overflow when allocating
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- alloc-overflow (bookmark) on default (branch)
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
mercurial/bdiff.c | ||
---|---|---|
44 | Memory throughput is already a bottleneck in bdiff code. Is there an impact on hg perfbdiff with the change from malloc() to calloc()? |
Comment Actions
Before:
! wall 0.002096 comb 0.000000 user 0.000000 sys 0.000000 (best of 1329)
After:
! wall 0.002094 comb 0.000000 user 0.000000 sys 0.000000 (best of 1355)
so, uh, calloc is slightly faster? but not enough to even matter.
Comment Actions
Wait, I'm a moron, I forgot to do ./hg instead of hg. New results:
Before:
! wall 0.002058 comb 0.000000 user 0.000000 sys 0.000000 (best of 1293)
After:
! wall 0.002107 comb 0.000000 user 0.000000 sys 0.000000 (best of 1342)
so calloc() is very slightly slower, but it's so little I'm not inclined to sweat it.
Memory throughput is already a bottleneck in bdiff code. Is there an impact on hg perfbdiff with the change from malloc() to calloc()?