except that this path is now saved and the dwarf will have it in it's memory so that it can be recalled at any moment.
And you can do that with A* pathfinding as well, just as easily, if not more so, it's been brought up before as path caching. And you can do some things to counter the problems aepurniet brings up, like removing paths them from the cache when there's an update to the map that could make them out of date or just removing them after a period of time or such, trading off speed for accuracy. Which always has to be done in any case, or everyone will just attempt to take the same path they took the first time, no matter what changes, like a new passageway opening up, or a wall being built in their way, or so on.
But there can also be problems to that, say for example you have a path cached from a workshop to a tile in a stockpile, and then a dwarf wants to find a path from the workshop to the same stockpile, just one tile over. If you just looked for a path in the cache directly there, you wouldn't find anything, and would have to find a new path. Or, if you wanted to try and use partial path caching or something like that, how do you check paths in the cache to see if they can be used to reach your destination? I mean, you could check every path that could potentially be used, and check the pathfinding from you to it's starting point, and from it's ending point to your destination, or to another cached path, or so on. But if you're not careful with it, that can quickly end up taking more processing power than just finding the path directly would take.
Or, you can set up a system in which pathing, and path caching is much easier, because it can look at larger areas, rather than just one tile at a time. For example, with the pathfinding suggestion I gave above, a cached path could work for any dwarf going from the same general area to another same general area, like from anywhere in a dining room to anywhere in a food stockpile, or so on, because it works in large sections, and only needs to think about the connections between them. Or hierarchical pathfinding, which splits the map up into larger grids, and could work roughly the same way. Although cached paths in those instances might not end up perfect, since you can be starting at some point within that starting area, but they would be close, and the pathfinding in general would be much faster, even without the caching.