From: Alan P. <ap...@re...> - 2003-06-09 06:13:49
|
In article <01b201c32e41$ce0853b0$2413f9ca@WARP>, Nicolas Cannasse wrote: > > I'll try to review theses patch when I have some time. > I think it's good idea to remove the try..catch blocks when we have a "fast" > count in concat and append, because they occur in each call to next . But > for fold / iter , I'm not sure, mainly because a fast count can still be > O(N) and cost more than having one try...catch block setuped. Could you do > some benchs using ExtList.enum instead of Enum.init ? The "fast" count is > O(N) here in this case ( but is computed only once ). With big lists ( "when > we need speed" ) I'm pretty sure it will be better not to call count. I was operating under the assumption that "fast" would be set only for data structures that had their count readily available -- for instance, dynarray and init. |