You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include<cstdio>
#include"task.h"
task t() {
int cond_1 = 1;
int cond_2 = 1;
int cond_3 = 1;
...
int val = 0;
if (cond_1) val++;
if (cond_2) val++;
if (cond_3) val++;
...
printf("%d\n", val);
co_return;
}
My test result:
n: 2000
real 0m2.697s
user 0m2.583s
sys 0m0.105s
n: 4000
real 0m8.662s
user 0m8.314s
sys 0m0.332s
n: 6000
real 0m19.107s
user 0m18.330s
sys 0m0.734s
n: 8000
real 0m35.622s
user 0m34.018s
sys 0m1.436s
n: 10000
real 0m50.344s
user 0m48.158s
sys 0m1.959s
n: 12000
real 1m12.844s
user 1m9.896s
sys 0m2.728s
n: 14000
real 1m57.271s
user 1m52.938s
sys 0m4.076s
n: 16000
real 2m42.044s
user 2m35.904s
sys 0m5.635s
n: 18000
real 3m28.608s
user 3m20.904s
sys 0m7.057s
n: 20000
real 4m6.561s
user 3m56.836s
sys 0m9.012s
The compilation speed is really slow for very large coroutines (which can be generated by program in our use cases).
The text was updated successfully, but these errors were encountered:
In clang 15.0.3, the compilation time of coroutine seems to grow non-linearly against code size (I have tested on linux and macOS).
Here are the simplified examples I generated.
task.h
which defines the coroutine data structures:gen.cpp
which generates the coroutine use cases:test.sh
used to run the test:The generated
a.cpp
is like:My test result:
The compilation speed is really slow for very large coroutines (which can be generated by program in our use cases).
The text was updated successfully, but these errors were encountered: