XmacsLabs / lolly

lolly: A user-friendly C++ library
https://xmacslabs.github.io/lolly/
GNU General Public License v3.0
10 stars 6 forks source link

replace legacy string with lolly_string #296

Closed jingkaimori closed 7 months ago

jingkaimori commented 7 months ago

Changes

Performance

Before

ns/op op/s err% total benchmark
112.97 8,851,657.81 1.2% 0.27 string from int_16
113.53 8,808,509.70 0.5% 0.27 string from int_32
116.08 8,615,090.92 0.5% 0.28 string from int_64
224.31 4,458,183.60 1.3% 0.54 string from double

After

ns/op op/s err% total benchmark
107.95 9,263,974.89 1.0% 0.26 string from int_16
105.45 9,483,062.34 1.4% 0.25 string from int_32
105.85 9,447,547.71 1.2% 0.25 string from int_64
162.49 6,154,251.13 1.7% 0.39 string from double
da-liii commented 7 months ago

Let me complete the macOS part?

jingkaimori commented 7 months ago

Let me complete the macOS part?

yes, you can commit directly on this branch.

Failure of lint ci may be erroneous, such indentation cannot pass formatter installed on my computer

da-liii commented 7 months ago

Failure of lint ci may be erroneous, such indentation cannot pass formatter installed on my computer

It seems to be a clang-format bug.

da-liii commented 7 months ago

build and test ok on my macOS 14, what C++ standard are you using?

da-liii commented 7 months ago

Which pr should I merge first to minimize the code changes (git conflicts)? This pr or https://github.com/XmacsLabs/lolly/pull/295?

da-liii commented 7 months ago

Replacing the legacy string with lolly_string should be done in a project, for example project 21.

It should be done in several small pull requests.

jingkaimori commented 7 months ago

Which pr should I merge first to minimize the code changes (git conflicts)?

295 , because the two pr is orthodox, thus small pr comes first can reduce changes

what C++ standard are you using?

C++17, written in xmake.lua

It should be done in several small pull requests.

only split headers from basic.hpp can be move to another pull request

da-liii commented 7 months ago

build and test ok on my macOS 14, what C++ standard are you using?

Here is the clues to fix ci on macOS https://github.com/llvm/llvm-project/issues/59374

da-liii commented 7 months ago

LGTM, and you should split the pull request into smaller ones.

da-liii commented 7 months ago

You can split basic.hpp in 21_1, and then re-implement as_string in 21_2

da-liii commented 7 months ago

You can use cherry-pick and git squash to split this pull request.

jingkaimori commented 7 months ago

Two part of this pr is merged, so close this one