[arith_uint256] Avoid unnecessary this-copy using prefix operator #12564

pull kallewoof wants to merge 1 commits into bitcoin:master from kallewoof:optim-arith_uint256-operator-dec changing 1 files +1 −1
  1. kallewoof commented at 11:00 AM on February 28, 2018: member

    I noticed while profiling a related project that operator-() actually calls the base_uint constructor, which is because the postfix operator version of operator++ (used in operator-()) creates a copy of this and returns it.

  2. [arith_uint256] Avoid unnecessary this-copy using prefix operator 22b4aae028
  3. fanquake added the label Refactoring on Feb 28, 2018
  4. promag commented at 12:43 PM on February 28, 2018: member

    utACK 22b4aae.

  5. MarcoFalke commented at 1:59 PM on February 28, 2018: member

    utACK 22b4aae028

  6. ajtowns commented at 8:55 PM on February 28, 2018: member

    utACK 22b4aae0284511e9a6a957197dae237a1799aa20

  7. Empact commented at 12:41 AM on March 1, 2018: member

    utACK 22b4aae

  8. laanwj commented at 2:53 PM on March 5, 2018: member

    Hah, you've find a rare example of a case where prefix/postfix decrease actually makes a difference! nice. utACK https://github.com/bitcoin/bitcoin/commit/22b4aae0284511e9a6a957197dae237a1799aa20

  9. laanwj merged this on Mar 6, 2018
  10. laanwj closed this on Mar 6, 2018

  11. laanwj referenced this in commit b7c8812ad0 on Mar 6, 2018
  12. kallewoof deleted the branch on Mar 6, 2018
  13. markblundeberg referenced this in commit 1fc4b4a466 on May 23, 2019
  14. jonspock referenced this in commit e3429d1c4c on Jun 13, 2019
  15. jtoomim referenced this in commit c4fc668120 on Jun 29, 2019
  16. PastaPastaPasta referenced this in commit 1dacdf5207 on Jun 10, 2020
  17. PastaPastaPasta referenced this in commit 400077035f on Jun 13, 2020
  18. PastaPastaPasta referenced this in commit 6eae72a4ff on Jun 13, 2020
  19. PastaPastaPasta referenced this in commit 9c1e5bc2b7 on Jun 13, 2020
  20. PastaPastaPasta referenced this in commit 2d6aec0311 on Jun 17, 2020
  21. gades referenced this in commit 6ef2d601f7 on Jul 1, 2021
  22. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me