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

[REBOL] Re: el(se)if constriction

From: peoyli:algonet:se at: 28-Oct-2000 18:23

Andrew, Ladislav & Gabriele, Thanks for your answers to this one. I have tested all of these together with my 'elif' construction, and found out that the difference in speed between these four alternatives are small, and varying depending on how many conditions to test for. Some results Data set: 70 files, with identical (but different) data to be parsed (tv program tables), about 20-50 entries in each of the files. The conditions are using parse to extract the start time, title & description, and title only (if no description was available). 3 tests 9 tests (6 extra of the most advanced) elif (/me) 0:51 1:13 - reduce is probably slowing it down pif (Ladislav) 0:50 1:11 ifs (Andrew) 0:56 1:11 any/if (Gabriele) 1:06 1:01 - No idea why 9 tests is faster than 3 so, the any/if combination is both the slowest and the fastest one (and I did not mix up the test times between the 3 and 9 tests). /PeO