function for greatest object in list less than or equal to a value

Richard Gaskin ambassador at fourthworld.com
Tue Oct 13 10:33:52 EDT 2015


Peter TB Brett wrote:

 > On 13/10/2015 14:42, hh wrote:
 >> There is an interesting difference between LC versions 6 and 7.
 >>...
 >> [a] LC 6.7.7
 >> repeat-PMB 0.326 <- fastest
 >> repeat-GC 0.350
 >> repeat-hh 0.445
 >> sort-GC 0.985
 >>
 >> [b] LC 7.1.0
 >> repeat-PMB 3.562
 >> repeat-GC 1.483 <- fastest, the only one with a factor < 9
 >> repeat-hh 1163.0 <- an ARRAY BUG? :-(
 >> sort-GC 8.156
 >
 > There's no array bug -- it's an aspect of its intentional behaviour.
 > Appending to an element of an array always causes a copy, so you get
 > O(N^2) complexity.

Thanks for the background, Peter, but what accounts for the difference 
between version (v6 @ 0.445ms vs v7 @ 1163.0ms)?


 > Please re-test in LiveCode 8.0.0-dp-7, because there are some large
 > performance optimisations in that release that may affect these
 > results.

Being part of LiveCode Script and not specific to Builder, will these 
changes also be in v7.x?

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list