Reduce boost dependency (boost/algorithm/string/split) #22683

issue Purva-Chaudhari opened this issue on August 11, 2021
  1. Purva-Chaudhari commented at 5:16 PM on August 11, 2021: none

    Proposing a method to remove the dependency of the boost/algorithm/string/split library. It can be done by including a small function in utils or adding a small alternative code patch in its use cases. The proposed method is much more efficient than the boost/algorithm/string/split. Here is a small demonstration which performs the same task in just 11 microseconds compared to boost library which takes 30 microseconds. (View here) The suggested alternative would reduce boost dependency in the files and thus improve their compilation and execution efficiency.

    Following reference states that over big data the boost split performs a lot slower compared to stl implementation: https://stackoverflow.com/questions/5505965/fast-string-splitting-with-multiple-delimiters.

    I'm happy to open a PR with these changes, but currently looking for concept ACKs to confirm if this is a good direction.

  2. Purva-Chaudhari added the label Feature on Aug 11, 2021
  3. fanquake commented at 3:49 AM on August 12, 2021: member

    Boost removal is an eventual goal of the project. We've had similar proposals to remove these Boost components in the past, i.e #13751, you might want to read through that PR for some context. Note that there are also currently PR's open that remove Boost usage, i.e #18130, so you may also be interested in reviewing those.

  4. fanquake removed the label Feature on Aug 12, 2021
  5. fanquake added the label Brainstorming on Aug 12, 2021
  6. hebasto commented at 4:14 PM on August 12, 2021: member

    Proposing a method to remove the dependency of the boost/algorithm/string/split library. It can be done by including a small function in utils or adding a small alternative code patch in its use cases.

    ... a comprehensive set of unit tests must be included as well. And all the new code must be maintained forever :)

    The proposed method is much more efficient than the boost/algorithm/string/split. Here is a small demonstration which performs the same task in just 11 microseconds compared to boost library which takes 30 microseconds.

    I don't think the efficiency of the current code is an issue.

    Boost removal is an eventual goal of the project.

    After adding boost::process it looks like a moving target :)

  7. MarcoFalke commented at 10:39 AM on August 23, 2021: member

    After adding boost::process it looks like a moving target :)

    At least boost::process is optional.

    I think before looking into removing header-only boost dependencies, we should be looking into lower hanging fruits such as the filesystem library. See #20744.

  8. fanquake commented at 8:40 AM on August 8, 2022: member

    Going to close this for now. boost/algorithm/string/split has since been removed: #25057.

  9. fanquake closed this on Aug 8, 2022

  10. bitcoin locked this on Aug 8, 2023

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-13 21:14 UTC

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