Open godwhoa opened 2 years ago
Thanks! my browser won't let me look at that site due to a security issue, but I'd be happy to refactor the code to use an array instead of a hashmap
In fact, it shouldn't be using a hashmap at all, that's something that was left over in my brain when implementing a sparsely populated dungeon map instead of a completely filled-in grid.
Next time AoC goes quickly (like today, for day 17), I'll work on this on-stream
Hey! It's me from twitch chat. Here's the CPU profile for day 15. I think using a HashMap for
cost
might be the issue. 60% of the CPU time is being spent onHashMap::get
Here's the flamegraph generated by pprof-rs: https://a.pomf.cat/onznha.svg I wish I knew enough rust to refactor the code, but this is all I can do. Cheers!