• B
    Optimize Journey::Route#score · f1525dac
    Ben Hughes 提交于
    Scoring routes based on constraints repeated many type conversions that
    could be performed in the outer loop.  Determinations of score and
    fitness also used Array operations that required allocations.  Against
    my benchmark with a large routeset, this reduced object allocations by
    over 30x and wall time by over 3x.
    f1525dac
formatter.rb 5.7 KB