![在下面的代码中我应该选择线性时间还是二次时间?](https://linux22.com/image/410326/%E5%9C%A8%E4%B8%8B%E9%9D%A2%E7%9A%84%E4%BB%A3%E7%A0%81%E4%B8%AD%E6%88%91%E5%BA%94%E8%AF%A5%E9%80%89%E6%8B%A9%E7%BA%BF%E6%80%A7%E6%97%B6%E9%97%B4%E8%BF%98%E6%98%AF%E4%BA%8C%E6%AC%A1%E6%97%B6%E9%97%B4%EF%BC%9F.png)
例子:
1.
unitsize(1cm);
size(300);
path polygon(... pair[] K){
path p;
for(int i=0;i<K.length;++i){
p=p--K[i];
}
return p--cycle;
}
draw(polygon((0,0),(3,0),(3,3),(1.5,5),(0,3)),dashed);
shipout(bbox(2mm,invisible));
2.
unitsize(1cm);
size(300);
path polygon(... pair[] K){
guide p;
for(int i=0;i<K.length;++i){
p=p--K[i];
}
path g=p--cycle;
return g;
}
draw(polygon((0,0),(3,0),(3,3),(1.5,5),(0,3)),dashed);
shipout(bbox(2mm,invisible));
两者具有相同的输出,但我应该选择哪一个(例如关于processing times
)?