Optimizing pathfinding algorithms in robotics

I’ve been digging into A* and Dijkstra’s algorithms for navigating complex environments, but I’m feeling a bit stuck on optimizing performance for real-time applications. Have any of you managed to reduce processing time while maintaining accuracy; i’m currently using ROS for integration and could use some tips.

‌⁠‍⁠​‍​‍‌⁠‌​​‍​‍​⁠‍‍​‍​‍‌‍‌‌‌‍⁠‍‌‍‌⁠‌‍‍‌‌‍⁠‍‌‍‌‌‌‍‌‌‌⁠​‍‌‍‍‌‌‍⁠‍‌‍‌⁠​‍​‍​‍⁠​​‍​‍‌‍‍⁠​‍​‍​⁠‍‍​‍​‍‌‍⁠‍‌‍‌‌‌⁠‌⁠‌‌⁠⁠‌⁠‌​‌‍⁠⁠‌⁠​​‌‍‍‌‌‍​⁠​‍​‍​‍⁠​​‍​‍‌‍‍‌‌‍‌​​‍​‍​⁠‍‍​‍​‍‌‍⁠‍‌‍‌‌‌⁠‌⁠​‍​‍​‍⁠​​‍​‍‌‍‌​​‍​‍​⁠‍‍​‍​‍​⁠​‍​⁠​​​⁠​‍​⁠‌‍​⁠​​​⁠‌⁠​⁠​​​⁠‌‌​‍​‍​‍⁠​​‍​‍‌‍‍​​‍​‍​⁠‍‍​‍​‍​⁠​​​⁠‍​‌‌‌‍‌‍‌​‌⁠​​‌‌‌‌‌​‍‍‌‌​‌‌‍‍⁠‌‍​‌​⁠‌​‌​‍​‌⁠​‌‌‍‍‍‌​⁠​‌‌‌‍​‍​‍‌⁠⁠‌