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

[REBOL] Re: Sort by first part of line

From: joel:neely:fedex at: 7-Sep-2002 10:05

Hi, Romano, Romano Paolo Tenca wrote:
> Here are my test where you can seel the result of system/stats > and allocated memory increase: > > Rebol 1.2.5.3.1 - Celeron 333 RAM 128 Mb Window 98 first edition > reading data : 0:00:00.11 memory allocated: 6465424 > Scott : 0:00:02.74 memory allocated: 10714448 > Carl : 0:00:02.58 memory allocated: 12752096 > Romano : 0:00:01.54 memory allocated: 15060400 > Romano-int : 0:00:01.7 memory allocated: 17671880 > Joel : 0:00:01.49 memory allocated: 22394888 > got same results > done > > By other test i noticed than Joel code use 3 Mb memory more than > others tests. >
No surprise there, as the "bucket-grouping" approach creates a second structure containing the same strings, rather than rearranging the strings within a single block. That's a fairly common space-for-time tradeoff. This reminds me of the sign in a programming office... Computer software developed here: Good, Fast, Cheap (pick any two!) -jn- -- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]