I've got a solid background in Python and web development (focusing more on Python than frameworks) and even built a hiking route app. Recently, a friend suggested I could improve my app's performance by using C++ for the A* algorithm instead of Python. He mentioned that switching to C++ could speed up my algorithm by 10-100x, which I definitely need since my current app can take 5-10 seconds to create a route for just a small county in the UK. I'm curious if this speed improvement is accurate and whether my current programming knowledge (like OOP concepts and basic data structures) is enough to start learning C++.
4 Answers
When it comes to your friend's estimate, it's really plausible. Proper optimization in C++ can lead to substantial performance boosts, especially for algorithms like A*. However, don't feel pressured about timing. Work on your current project while casually learning C++, and you'll find the right balance!
Honestly, it's best to learn C++ when you're prepared for it. Some people find it easier to grasp computer science principles using C++. It’s true that Python isn't as fast for computations, so C++ could really help with speed in your app. Just be aware that as you delve into C++, things can get a bit complicated, especially once you start tackling advanced concepts. But it could definitely be worth the effort!
You can start learning C++ whenever you feel ready! It sounds like you have a decent foundation in programming, so diving into C++ now could be beneficial. It's true that if your algorithm is well-implemented in C++, you could see a significant speedup compared to Python. Many users report improvements well over 10x, especially if you utilize efficient coding practices.
You seem to be in a good spot to start exploring C++. Your grasp of basic concepts means you're not starting from scratch, which is great. Plus, it’s also worth checking out libraries that can accelerate performance. Just keep in mind that C++ can be challenging at times, so take it slow and steady!
Absolutely! And once you get a handle on it, you might find C++ liberating compared to Python!

Yeah, I've switched some of my projects from Python to C++ and noticed huge performance gains, especially with algorithms!