Optimize HTTP status messages #566

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:optimize_http_status changing 1 files +8 −7
  1. luke-jr commented at 8:56 PM on October 4, 2011: member

    Use C's const char* for status strings rather than C++'s std::string, which is slower

  2. gavinandresen commented at 2:16 PM on October 5, 2011: contributor

    How much slower, for what, on what type of system?

  3. luke-jr commented at 3:01 PM on October 5, 2011: member

    C++ would need to: allocate memory for std::string data, scan length of const data, copy const data, return a pointer to its own data, and make at least 3 function calls to do so. The C equivalent just passes the pointer to the const data directly. I imagine under high load, this could make a difference, but I haven't done any benchmarking. Apparently it was deemed important enough for JoelKatz to take his time to do it.

  4. TheBlueMatt commented at 3:05 PM on October 5, 2011: member

    This is just cleaner code anyway, no reason not to merge.

  5. gavinandresen commented at 6:37 PM on October 5, 2011: contributor

    needs rebasing

  6. Use C's const char* for status strings rather than C++'s std::string, which is slower ae81b82fb8
  7. luke-jr commented at 6:50 PM on October 5, 2011: member

    Rebased.

  8. gavinandresen referenced this in commit e653578db3 on Oct 5, 2011
  9. gavinandresen merged this on Oct 5, 2011
  10. gavinandresen closed this on Oct 5, 2011

  11. coblee referenced this in commit 1017f0ad14 on Jul 17, 2012
  12. ptschip referenced this in commit 62c4951c43 on Jul 21, 2017
  13. fjahr referenced this in commit a484e0008b on Jul 24, 2019
  14. elichai referenced this in commit 461acf5c6c on Aug 22, 2019
  15. sipa referenced this in commit 6b9cd1520b on Sep 24, 2019
  16. kallewoof referenced this in commit d669b31c9a on Oct 4, 2019
  17. kallewoof referenced this in commit c866f52e2a on Oct 4, 2019
  18. sipa referenced this in commit 544c1f35e7 on Nov 6, 2019
  19. sipa referenced this in commit d5cd9db7a3 on Nov 19, 2019
  20. sipa referenced this in commit de659898b6 on Jan 21, 2020
  21. sipa referenced this in commit 36362dfb90 on Jan 23, 2020
  22. jnewbery referenced this in commit 85e7d06351 on Mar 17, 2020
  23. sipa referenced this in commit 4977ac14d3 on Mar 18, 2020
  24. sipa referenced this in commit 5bf7fb5baa on Mar 18, 2020
  25. sipa referenced this in commit fb2a05e468 on Mar 19, 2020
  26. sipa referenced this in commit 497fad6f09 on Mar 21, 2020
  27. sipa referenced this in commit eae016f117 on Mar 22, 2020
  28. sipa referenced this in commit 4e37a7c2cb on Mar 27, 2020
  29. jnewbery referenced this in commit 9696dea839 on Apr 16, 2020
  30. jnewbery referenced this in commit a541fd0e87 on Apr 19, 2020
  31. sipa referenced this in commit c308759ea5 on Apr 19, 2020
  32. sipa referenced this in commit 4eaec32f1c on May 2, 2020
  33. sipa referenced this in commit ef7117193c on May 22, 2020
  34. sipa referenced this in commit 67f232b5d8 on Jun 9, 2020
  35. stackman27 referenced this in commit 78cde6f8c7 on Jun 26, 2020
  36. rajarshimaitra referenced this in commit 7f9206a0aa on Aug 5, 2021
  37. DrahtBot 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 15:16 UTC

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