• CameronDevM
    link
    fedilink
    arrow-up
    5
    ·
    1 day ago

    I use usize by default, but last year there was a challenge that significantly improved performance when I switched from usize to u8 (don’t recall which one though).

    • Deebster
      link
      fedilink
      English
      arrow-up
      2
      ·
      18 hours ago

      I normally use the “most appropriate” size, but this year I’m just using usize everywhere and it’s a lot more fun. So far I haven’t found any problem where it ran too slow and the problem was in my implementation and not my algorithm choice.

    • eco_game@discuss.tchncs.deOP
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      I usually use Longs by default too, but this year I mostly got by with Ints, so I’ve stuck to Ints for less memory (my solutions tend to be rather inefficient in that regard .-.)