Re: length() of an atom
- Posted by mattlewis (admin) Jul 28, 2010
- 1653 views
DerekParnell said...
but now I can code ...
--- r = x[1 .. i] & q & [i+1 .. $] n += length(q) ---
You should be using splice():
r = splice( x, q, i + 1 )
Especially in a loop, this makes a huge difference in performance (likewise for replace(), insert() and remove()).
Matt