• Mikael Salson's avatar
    Dynprog: Avoid millions (billions?) of small allocations · 66277bef
    Mikael Salson authored
    Previously we created small arrays of three integers to store information for backtracking.
    Now we have a structure storing the same information so that we can allocate an array of structures.
    Therefore we can allocate the whole array at once, and we don't need anymore to have plenty of allocations of three integers
dynprog.cpp 11.8 KB