rewrite sprout::algorithm::join performance

This commit is contained in:
bolero-MURAKAMI 2012-05-22 01:06:13 +09:00
parent 0ceabb5b9b
commit 1ea9d30e2a
145 changed files with 1359 additions and 364 deletions

View file

@ -135,4 +135,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_CPP

View file

@ -177,4 +177,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_RESULT_CPP

View file

@ -104,4 +104,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_CPP

View file

@ -104,4 +104,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_BACKWARD_CPP

View file

@ -110,4 +110,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_IF_CPP

View file

@ -104,4 +104,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_N_CPP

View file

@ -74,4 +74,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FILL_CPP

View file

@ -78,4 +78,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FILL_N_CPP

View file

@ -78,4 +78,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_GENERATE_CPP

View file

@ -82,4 +82,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_GENERATE_N_CPP

View file

@ -133,4 +133,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_INPLACE_MERGE_CPP

View file

@ -125,4 +125,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MAKE_HEAP_CPP

View file

@ -133,4 +133,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MAKE_PARTIAL_HEAP_CPP

View file

@ -221,4 +221,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MERGE_CPP

View file

@ -133,4 +133,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_NTH_ELEMENT_CPP

View file

@ -133,4 +133,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTIAL_SORT_CPP

View file

@ -74,4 +74,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTITION_CPP

View file

@ -110,4 +110,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTITION_COPY_CPP

View file

@ -70,4 +70,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_POP_HEAP_CPP

View file

@ -125,4 +125,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PUSH_HEAP_CPP

View file

@ -74,4 +74,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_CPP

View file

@ -110,4 +110,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_CPP

View file

@ -110,4 +110,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_IF_CPP

View file

@ -74,4 +74,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_IF_CPP

View file

@ -78,4 +78,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_CPP

View file

@ -116,4 +116,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_CPP

View file

@ -116,4 +116,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_IF_CPP

View file

@ -78,4 +78,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_IF_CPP

View file

@ -70,4 +70,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REBERSE_CPP

View file

@ -104,4 +104,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REBERSE_COPY_CPP

View file

@ -74,4 +74,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ROTATE_CPP

View file

@ -110,4 +110,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ROTATE_COPY_CPP

View file

@ -221,4 +221,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_DIFFERENCE_CPP

View file

@ -221,4 +221,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_INTERSECTION_CPP

View file

@ -221,4 +221,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_SYMMETRIC_DIFFERENCE_CPP

View file

@ -221,4 +221,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_UNION_CPP

View file

@ -76,4 +76,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_CPP

View file

@ -97,4 +97,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_RESULT_CPP

View file

@ -125,4 +125,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SORT_CPP

View file

@ -125,4 +125,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SORT_HEAP_CPP

View file

@ -74,4 +74,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_CPP

View file

@ -110,4 +110,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_COPY_CPP

View file

@ -125,4 +125,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_SORT_CPP

View file

@ -78,4 +78,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_CPP

View file

@ -116,4 +116,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_COPY_CPP

View file

@ -208,4 +208,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_TRANSFORM_CPP

View file

@ -125,4 +125,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_CPP

View file

@ -195,4 +195,3 @@ namespace testspr {
#endif
#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_COPY_CPP

View file

@ -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
//

View file

@ -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
//

View file

@ -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
//

View file

@ -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),