From: PremiumBlend on 4 May 2010 10:46 Hello, Why is the REVLIST command so slow? Is there a faster method of reversing the order of objects in a list? Mark
From: Raymond Del Tondo on 4 May 2010 12:21 "PremiumBlend" <mnhollinger(a)yahoo.com> schrieb im Newsbeitrag news:cadc0dbc-9231-4050-9662-922a6d410c4b(a)o11g2000yqj.googlegroups.com... > Hello, > > Why is the REVLIST command so slow? > Is there a faster method of reversing the > order of objects in a list? > > Mark > Hello, the problem is not the reverse mechanism itself. It's the INNERCOMP which explodes the list, that can take much time and memory. Reversing the individual elements is nothing more than reversing a sequence of pointers. Unfortunately the INNERCOMP is called in the REVLIST cmd, before the actual reversing begins. And after that, the list will be constructed again. Actually the subroutine which includes INNERCOMP does a lot more, but the INNERCOMP is the most time consuming part of it;-) Faster method? Don't use lists. Use meta objects or arrays where possible. HTH Raymond
|
Pages: 1 Prev: The inventor of the computer, Konrad Zuse - a novel Next: Multiple languages in a library |