mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-08-23 14:20:52 +00:00
rewrite sprout::algorithm::join performance
This commit is contained in:
parent
0ceabb5b9b
commit
1ea9d30e2a
145 changed files with 1359 additions and 364 deletions
|
@ -135,4 +135,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_CPP
|
||||
|
||||
|
|
|
@ -177,4 +177,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_RESULT_CPP
|
||||
|
||||
|
|
|
@ -104,4 +104,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_CPP
|
||||
|
||||
|
|
|
@ -104,4 +104,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_BACKWARD_CPP
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_IF_CPP
|
||||
|
||||
|
|
|
@ -104,4 +104,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_N_CPP
|
||||
|
||||
|
|
|
@ -74,4 +74,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FILL_CPP
|
||||
|
||||
|
|
|
@ -78,4 +78,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FILL_N_CPP
|
||||
|
||||
|
|
|
@ -78,4 +78,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_GENERATE_CPP
|
||||
|
||||
|
|
|
@ -82,4 +82,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_GENERATE_N_CPP
|
||||
|
||||
|
|
|
@ -133,4 +133,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_INPLACE_MERGE_CPP
|
||||
|
||||
|
|
|
@ -125,4 +125,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MAKE_HEAP_CPP
|
||||
|
||||
|
|
|
@ -133,4 +133,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MAKE_PARTIAL_HEAP_CPP
|
||||
|
||||
|
|
|
@ -221,4 +221,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MERGE_CPP
|
||||
|
||||
|
|
|
@ -133,4 +133,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_NTH_ELEMENT_CPP
|
||||
|
||||
|
|
|
@ -133,4 +133,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTIAL_SORT_CPP
|
||||
|
||||
|
|
|
@ -74,4 +74,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTITION_CPP
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTITION_COPY_CPP
|
||||
|
||||
|
|
|
@ -70,4 +70,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_POP_HEAP_CPP
|
||||
|
||||
|
|
|
@ -125,4 +125,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PUSH_HEAP_CPP
|
||||
|
||||
|
|
|
@ -74,4 +74,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_CPP
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_CPP
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_IF_CPP
|
||||
|
||||
|
|
|
@ -74,4 +74,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_IF_CPP
|
||||
|
||||
|
|
|
@ -78,4 +78,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_CPP
|
||||
|
||||
|
|
|
@ -116,4 +116,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_CPP
|
||||
|
||||
|
|
|
@ -116,4 +116,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_IF_CPP
|
||||
|
||||
|
|
|
@ -78,4 +78,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_IF_CPP
|
||||
|
||||
|
|
|
@ -70,4 +70,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REBERSE_CPP
|
||||
|
||||
|
|
|
@ -104,4 +104,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REBERSE_COPY_CPP
|
||||
|
||||
|
|
|
@ -74,4 +74,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ROTATE_CPP
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ROTATE_COPY_CPP
|
||||
|
||||
|
|
|
@ -221,4 +221,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_DIFFERENCE_CPP
|
||||
|
||||
|
|
|
@ -221,4 +221,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_INTERSECTION_CPP
|
||||
|
||||
|
|
|
@ -221,4 +221,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_SYMMETRIC_DIFFERENCE_CPP
|
||||
|
||||
|
|
|
@ -221,4 +221,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_UNION_CPP
|
||||
|
||||
|
|
|
@ -76,4 +76,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_CPP
|
||||
|
||||
|
|
|
@ -97,4 +97,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_RESULT_CPP
|
||||
|
||||
|
|
|
@ -125,4 +125,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SORT_CPP
|
||||
|
||||
|
|
|
@ -125,4 +125,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SORT_HEAP_CPP
|
||||
|
||||
|
|
|
@ -74,4 +74,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_CPP
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_COPY_CPP
|
||||
|
||||
|
|
|
@ -125,4 +125,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_SORT_CPP
|
||||
|
||||
|
|
|
@ -78,4 +78,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_CPP
|
||||
|
||||
|
|
|
@ -116,4 +116,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_COPY_CPP
|
||||
|
||||
|
|
|
@ -208,4 +208,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_TRANSFORM_CPP
|
||||
|
||||
|
|
|
@ -125,4 +125,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_CPP
|
||||
|
||||
|
|
|
@ -195,4 +195,3 @@ namespace testspr {
|
|||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_COPY_CPP
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Copyright (c) 2012
|
||||
// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/
|
||||
// osyo-manga : http://d.hatena.ne.jp/osyo-manga/
|
||||
//
|
||||
//
|
||||
// Readme:
|
||||
// https://github.com/osyo-manga/cpp-half/blob/master/README
|
||||
//
|
||||
|
@ -17,7 +17,7 @@
|
|||
|
||||
int
|
||||
main(){
|
||||
|
||||
|
||||
//
|
||||
// String literal to Sprout.String
|
||||
//
|
||||
|
@ -30,7 +30,7 @@ main(){
|
|||
static_assert(str2 == L"ほむほむ", "");
|
||||
static_assert(std::is_same<decltype(str2), sprout::wstring<4> const>{}, "");
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Integer literal to Sprout.String
|
||||
//
|
||||
|
@ -38,7 +38,7 @@ main(){
|
|||
static constexpr auto str = sprout::to_string(42);
|
||||
static_assert(str == "42", "");
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Float literal to Sprout.String
|
||||
//
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Copyright (c) 2012
|
||||
// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/
|
||||
// osyo-manga : http://d.hatena.ne.jp/osyo-manga/
|
||||
//
|
||||
//
|
||||
// Readme:
|
||||
// https://github.com/osyo-manga/cpp-half/blob/master/README
|
||||
//
|
||||
|
@ -22,7 +22,7 @@
|
|||
//
|
||||
int
|
||||
main(){
|
||||
|
||||
|
||||
//
|
||||
// String literal to Sprout.String
|
||||
//
|
||||
|
@ -66,7 +66,7 @@ main(){
|
|||
static_assert(*(str1.end() - 1) == 'u', "");
|
||||
static_assert(*(str1.rbegin() + 1) == 'm', "");
|
||||
static_assert(*(str1.rend() - 2) == 'o', "");
|
||||
|
||||
|
||||
//
|
||||
// IOStream
|
||||
//
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Copyright (c) 2012
|
||||
// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/
|
||||
// osyo-manga : http://d.hatena.ne.jp/osyo-manga/
|
||||
//
|
||||
//
|
||||
// Readme:
|
||||
// https://github.com/osyo-manga/cpp-half/blob/master/README
|
||||
//
|
||||
|
@ -23,13 +23,13 @@
|
|||
int
|
||||
main(){
|
||||
namespace w = sprout::weed;
|
||||
|
||||
|
||||
//
|
||||
// __TIME__ to Sprout.String
|
||||
//
|
||||
static constexpr auto time = sprout::to_string(__TIME__);
|
||||
// static constexpr auto time = sprout::to_string("23:22:45");
|
||||
|
||||
|
||||
|
||||
//
|
||||
// parse __TIME__
|
||||
|
@ -37,8 +37,8 @@ main(){
|
|||
constexpr auto expr = w::int_ >> ':' >> w::int_ >> ':' >> w::int_;
|
||||
static constexpr auto result = w::parse(time.begin(), time.end(), parser);
|
||||
static_assert(result.success(), "failed parse");
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// get result
|
||||
//
|
||||
|
@ -54,8 +54,8 @@ main(){
|
|||
std::cout << hour << std::endl;
|
||||
std::cout << minute << std::endl;
|
||||
std::cout << second << std::endl;
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// compile time output
|
||||
//
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Copyright (c) 2012
|
||||
// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/
|
||||
// osyo-manga : http://d.hatena.ne.jp/osyo-manga/
|
||||
//
|
||||
//
|
||||
// Readme:
|
||||
// https://github.com/osyo-manga/cpp-half/blob/master/README
|
||||
//
|
||||
|
@ -18,11 +18,11 @@
|
|||
int
|
||||
main(){
|
||||
namespace w = sprout::weed;
|
||||
|
||||
|
||||
static constexpr auto max_string_size = 32;
|
||||
static constexpr auto space = *w::omit[ w::space ];
|
||||
static constexpr auto remove_space = *w::lim<max_string_size>(space >> w::char_);
|
||||
|
||||
|
||||
static constexpr auto source = sprout::to_string(" homu : mami= 10 ");
|
||||
static constexpr auto result = w::parse(
|
||||
sprout::begin(source), sprout::end(source),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue