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

[REBOL] Re: Clunky-looking code

From: rgombert:essentiel at: 2-Apr-2001 21:09

It's also interesting to notice the relative speed of each function (multiply 2 blocks of 15 integers): multiply-blocs > 0:01:34.32 MultiplyBlocks1 > 0:01:46.32 MultiplyBlocks2 > 0:00:51.06 MultiplyBlocks3 > 0:00:38.46 Note that you don't need to explicitely use RETURN in your functions, since the last value of the affectation is still availlable when Rebol exits the loop. MultiplyBlocks3: func [ Block1 Block2 /local Sum ][ sum: 0 repeat i min length? Block1 length? Block2 [sum: sum + (Block1/:i * Block2/:i)] ] Renaud