- Joined
- 3/3/11
- Messages
- 22
- Points
- 11
I've heard that fast languages like C++ are better at implementing this type of quant simulation compare to Java. But I'm planning to use Java anyway. What would you recommend?
I think Java is fine. The difference in speed of runtime is minmial. However, Java provides better library so development time could be less. However, programming in Java isn't what a quant usually do.
?????C++ is preferred over any other programming languages because of its compilation speed.
?????![]()
Tsotne, thank you for the useful insight of all these languages. You mentioned minimizing development time, that's exactly what I am trying to do. Speed is definitely not an issue here so I will definitely stick to Java for now.
Let's think of it this way: we have a trade off to make between development and processing time. If the concern is minimizing the development time then we should select those programming languages which have richer libraries like C# which is one of the most sophisticated language carrying a rich library making the development time to be minimized. You don't have to reinvent the wheel when working on .NET 4 platform since it grants you the capabilities to do whatever you want from the richest toolbox. But in C++ you have to invent some classes since you are not granted such capabilities. But that downside has one advantage: rich library requires more processing time, since C++ hasn't got such rich library it is by far fast than C#. I have read somewhere recently that well designed C# application can be 90% as fast as well designed C++ application. But achieving well design in C++ can be quite complicated due to some reasons mentioned above. That's what I meant. You can view C# as the Microsoft version of Java. C++ is faster than Java but it also depends on the application specifics. There are some nuances which are impossible (or very very hard) to achieve in C++. But all in all, C++ is and will always remain as number 1 programming language for quants since we sometimes need to make algorithms processing a large number of data. Let's take your case, you need some simulation to conduct, C++ will definitely handle numerical calculations faster than Java especially if you are shooting a large number of vectors. But Java and other languages are ok, we only have to choose the priorities: Speed and efficiency on the expense of big development time or less development time and more processing time.
Best
Tsotne
You say C# is slower because it has "a rich library". That's entirely not true. It doesn't even seem like you understand what that term even means. The classes from the library which is utilized in your programs are the ones you call explicitly. The base library itself has nothing to do with .NET's speed of execution. It's not like the compiler scans over the entire library or something.
Rich library, isn't a complexity of a language's programming constructs determining what the speed will be?! Greater the ability of a language to handle problems or minimize the development time, lower the speed will be and vise versa. Take again C++, which is much more complex and difficult language than C#. It's complexity determines it's speed. It's kinda "rude" meaning that you have to handle many matters by hand which could be resolved in managed languages easily. The complexity of a language determines the speed. Give me one example where programming language is more difficult and complex and has a low speed of executing applications and vise versa.
- "Rich library, isn't a complexity of a language's programming constructs determining what the speed will be"
Again, the library has nothing to do with .NET's execution speed. It's just a collection of assemblies sitting somewhere in a folder on your pc which you can call into your program.
- "It's complexity determines it's speed. It's kinda "rude" meaning that you have to handle many matters by hand which could be resolved in managed languages easily"
Once they both get compiled, it doesn't matter. That isn't why C++ is faster; but it is faster initially though, i'm not denying that. The real issue here is not even C#, but .NET itself, so the "complexity of a language's programming constructs" is irrelevant. C# has more keywords. It has a larger base library, and has pointers just as in C++ (although not as powerful). You can handle low level issues with it. It is still a general purpose language. You can run it unmanaged, and with some slight modifications to .NET's JIT compiler, can outperform C++ in many cases.
???...but it is faster initially though
???
I really wonder: Doesn't a namespace imported effect the speed on the execution? I mean, when you have included a namespace, you have loaded then all the members of it with no option ro select among them which one to choose and which not - all is loaded. Does the execution speed completely ignore the size of that namespace?
I've heard that fast languages like C++ are better at implementing this type of quant simulation compare to Java. But I'm planning to use Java anyway. What would you recommend?
I've heard that fast languages like C++ are better at implementing this type of quant simulation compare to Java. But I'm planning to use Java anyway. What would you recommend?
???
I really wonder: Doesn't a namespace imported effect the speed on the execution? I mean, when you have included a namespace, you have loaded then all the members of it with no option ro select among them which one to choose and which not - all is loaded. Does the execution speed completely ignore the size of that namespace?