Closed filangelos closed 6 years ago
Is this on the AWS instance, or a laptop?
I would have thought a 15GB machine could do more than that, as the array is only about 8n^2, so 400M8 is about 3.2GB. Unless it is using 32-bit.
But anyway - consider the time and space complexity of the puzzle. Should they be the same?
It is on an 8GB laptop, I will try again on AWS and resolve the issue if I notice a considerable difference!
You will notice a slight difference, though probably not much :) I would guess about a factor of 2 in scale before you hit the same problem again.
But it's a good thing to hit early.
Running
edit_distance
forscaling>15000
throws astd::bad_alloc
exception.build command:
make bin/run_puzzle
execution command
bin/run_puzzle 20000 2
edit_distance.hpp
reference version