M2
M2 copied to clipboard
O(1) list and sequence operations
Here is an example of a simple operation involving lists and sequences which should really be an O(1) operation. There are many others like it.
i1 : elapsedTime(10^8:0);
-- 0.466494 seconds elapsed
---
i1 : elapsedTime toList toSequence toList(10^8:0);
-- 2.20352 seconds elapsed
Related: #1608, #1904, #1978