3 ms·
AFAIK speed is only a real issue in the financial sector for very few applications. For most of them the database is the bottle-neck not the programs. Also, se
by NotSwift 5y ago
AFAIK speed is only a real issue in the financial sector for very few applications. For most of them the database is the bottle-neck not the programs.
Also, security is generally important in this sector. Both C++ and Python do not have a good track record when it comes to security. C++ has a lot of guns to shoot yourself in the foot. Python is essentially un-typed which means that errors only show up on runtime. Where I live most financial software is still being developed in Java.
- riazrizvi 5y agoSpeed is an issue in many domains, for example graphics applications and games, embedded systems and scientific computing.
- aprdm 5y agoYes and Python is fast enough for many of those. It’s very rare that the speed of Python is an actual bottle neck that cannot be worked around and must be replaced in lieu of its effectiveness
- Zababa 5y agoNo it's not? At least not raw Python. Python calling C, C++ or Fortan could be fast enough but not raw Python.
- jnwatson 5y agoPython has dynamic, strong typing. C++ has static, weak typing. Modern Python also has optional static type checking that is already essentially standard for new code.
- CodeGlitch 5y agoExcept with C++ you have a compiler to tell you your code is broken. With Python you have to use MyPy which isn't perfect or write tests with 100% code coverage. I've never seen 100% code coverage...
- jnwatson 5y agoThe C++ compiler and mypy tell you about the same thing: your typing is consistent. Neither is even close to perfect about finding defects. You have to write unit tests anyway to validate other useful properties about your code. If you’re not close to 100% you’re doing it wrong. Even 100% coverage is a fairly low bar these days.
- nonameiguess 5y agoThis is true of public trading platforms, but for the earlier HFT apps that required speed, network was the bottleneck, and writing everything in C allowed them to hack the networking stack to get rid of all the bad assumptions of general-purpose computers that slow you down. Whether it's the BIOS itself or the kernel, or even if you're hacking the actual network appliances, the networking stack is almost certainly written in C, not giving you much of a choice if you have to change it. In more general quant and financial engineering applications, I think it was ecosystem inertia as much as anything. Many of the simulation and solver frameworks were based on physics libraries written in C++, and quantlib was built on top of Boost. C++ just became a de facto lingua franca for anyone doing that kind of work, and they weren't primarily programmers, so they weren't going to spend a lot of time learning other languages and ecosystems when they were already comfortable with and productive in C++.