Re: [netlogo-devel] partition list: is `sublist` surprisingly slow?

2016-04-01 Thread Bryan Head
Hi Alan, `sublist` should be pretty fast. Testing just now, NetLogo took 0.014s to take 50,000 sublists (length 1 to 50,000) of a 100,000 element list. Looking at the implementation, it should run in constant time with respect to the length sublist and `O(log_32(length of the main list))`

[netlogo-devel] partition list: is `sublist` surprisingly slow?

2016-04-01 Thread Alan Isaac
Is `sublist` suprisingly slow? Related: might NetLogo consider adding a fast `partition` primitive, providing the basic functionality of Mathematica's `Partition`? (I.e., given #lst and #n, return a list of sublists of length #n.) It would alternatively be find to behave more like haskell's