Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A<B<C...; slow #2131

Open
guwirth opened this issue May 3, 2021 · 1 comment
Open

A<B<C...; slow #2131

guwirth opened this issue May 3, 2021 · 1 comment
Labels

Comments

@guwirth
Copy link
Collaborator

guwirth commented May 3, 2021

Parsing of the below rare use case is still slow. (leftover #1685)

still slow:

void f() {
   ss < a < b < c < d < e < f < g;
}

fast:

using List= TypeA<A, TypeB<B, TypeC<C, TypeD<D, TypeE<E, TypeF<F, TypeG<G, TypeH<H, I>>>>>>>>;

void f1() {
   ss << a << b << c << d << e << f << g;
}

void f2() {
   TypeA<A, TypeB<B, TypeC<C, TypeD<D>>>>;
}

void f3() {
   TypeA<A, TypeB<B, TypeC<C, TypeD<D;
}
@guwirth guwirth added the bug label May 3, 2021
@guwirth guwirth changed the title A<B<C.... slow May 3, 2021
@guwirth
Copy link
Collaborator Author

guwirth commented Aug 7, 2021

From #2206 (slow):

#include <iostream>
#include <string>
#include <sstream>

std::ostream& operator< (std::ostream& dest, const std::string& what) { 
   return dest;
}

int main () 
{
   std::string a, b, c, d, e, f;
   std::stringstream dest;
   
   dest < a < b < c < d < e < f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 participant