Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Speed required

From: gregg:pointillistic at: 29-Nov-2007 12:36

Hi Kai, KP> remove-columns: function [ cursor [block!] columns [block!]] [ tmp result ]KP> [ KP> result: copy [] KP> foreach record cursor [ KP> tmp: copy [] KP> foreach column columns [ KP> append tmp pick record column KP> ] KP> append/only result tmp KP> ] KP> result KP> ] And is that not fast enough? The obvious thing to do is preallocate the result block to the correct size (make block! length? cursor) and use INSERT TAIL rather than APPEND. -- Gregg