Ad
  • Custom User Avatar

    done

  • Custom User Avatar

    This is an old discussion, but still...

    @albarralnunez's tests are wrong. If you time the custom min/max searcher with built-in functions (which is what should have been timed and compared) while using big inputs (where the random fluctuations in speed don't influence the overall time significantly enough to distort the outcome) you will see that calling a custom function will be nearly as fast AT BEST while on CW and repl.it it's always been approximately 1.4 - 2 times slower.

  • Custom User Avatar

    that's why I said "not always"! ;) My message was directed to you in case you didn't know but to other warriors too (who often do not know about that, especially warriors doing 7 kyus).

    Thanks for the complementary informations! :) (EDIT: note there's only 12-13% of gain in the perfromance, though, going from 4 passes of built-ins to 2 passes of "home-made" functions)

  • Default User Avatar

    Actually, do not bet on the gain in efficiency: often (not always), several passes with built-in functions are faster than one pass with one "home-made" function. Moreover, with a language like python, the more code you have to execute, the more slow you become.

  • Default User Avatar

    gonna go ahead and resolve this issue

  • Custom User Avatar

    The class is provided. You only need to implment the function, and the members are already there, rest and value.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution