Divide & Conquer divides, but doesn't conquer

Timon Gehr timon.gehr at gmx.ch
Mon May 25 00:44:37 UTC 2020


On 25.05.20 01:40, Andrei Alexandrescu wrote:
> ...
> 
> So it seems divide et impera doesn't quite help with certain recursive 
> templates.

Assuming the cost of a template instantiation is linear in the number of 
template arguments, the first version has running time Θ(n log n) while 
the second version has running time Θ(n²).


More information about the Digitalmars-d mailing list