Programming languages speed?
I know you can't really compare them that way. But in general, how do these languages rank based on speed: C, C++, C#, Rust? And should you learn Rust?
I know you can't really compare them that way. But in general, how do these languages rank based on speed: C, C++, C#, Rust? And should you learn Rust?
Hi, I have to hand in a computer science project (for tomorrow 💀) where I'm programming a drawing program. We're only allowed to use Tiger Jython Turtle, and I want to make it so that when you click in the x, y area with the mouse, it changes the pen color/thickness, etc. Thanks for your…
Good day, I am looking for a cash register system for club purposes which should be relatively inexpensive or even free. It must be able to do the following: Create and select articles Can create categories Increase and decrease quantities Create statistics Manage revenue Choose between cash and card payment if necessary Be able to…
On my test page, I have HTML and JS code that changes the image at a certain scroll value, but this code isn't located at the top of the page, but further down. If I scroll to the top of the page, the values are counted, and by the time I get to the code,…
These are the pricing requirements: Each trip is charged at a flat rate of €3.50, including the first 20km of a trip o For journeys up to and including 150km, each 10km block or part thereof that exceeds the above 20km, 1.50€ will be charged. o all additional kilometers will be charged at 0.10€/km.
Hey! I just wanted to use ChatGPT to process a text with about 60,000 tokens. Unfortunately, ChatGPT can only process texts with a maximum of 4,096 tokens. Does anyone know of an AI that might work?
Hello, my question is how can you show the customers if you have created the website locally? Thanks
As with all, you should consider at what point “performance” is necessary.
If I have to do any work on the file system, it would be complete nonsense to start VS and set up a C++ project.
I’ll do this with a line of Powershell… Then the performance is already in the letter of the “Programme”.
If you’re not just 5 billion. Calculate positions of PI (or do some super time-critical things), C# or Java is an acceptable compromise.
As with the above extreme example with Powershell, besides the “Nettoperformace” one should also keep an eye on the time required for development. It makes little sense to spend a couple of hours on a C solution when C# already offers a finished class.
…and of course you can program time-critical routines as native (unmanaged) code with C++ or even assembler and call C#.
And the following goes…
… it doesn’t matter if the “framework program” was written in C++ or C#
Rust could most probably be called Formula1 cars with airbags and beverage holders and child seat.
Learning Rust is worth considering. I do not necessarily think of performance – this is not bad at all at Rust – but rather of the form of storage management implemented in Rust, which offers much better safety properties compared to what we have in C for almost 50 years.
Right, you can’t.
So if you look at the very general basic execution speed, C and C++ should be roughly the same as both provide approximately the same result. C# is a bit slower because a runtime hangs in between, which does even more. Where Rust is, I don’t know.
However, the most performance problems at a distance are due to incorrect/next use of voice functions or frameworks. C++ likes to be used for high-performance applications, but it happens easily that you misuse it and create more performance problems than you solve. C#, on the other hand, is much simpler, which offers less such falling knits, but you can’t optimise as small as with C++ – but should be really relevant for the fewest projects.
If it really is about maximum performance, but you don’t want to have the additional risks of C/C++, I would combine C# and C++. C# as a “main language” for the actual application and the hot path (e.g. elaborate mathematical calculations) in C++, since C++ libraries can be called out quite simply from C#.
If it’s really important to get the last pairing speed out, C# might be a little slower than the others. C# is not compiled in the native processor code, but is executed in the .NET Runtime, which compils the code only to the end when it is executed.
For this, C# is much more pleasant to program than C or C++, because you don’t have to make sure that you pass any variables as a pointer or release any memory, etc. With Rust I don’t have enough experience to tell you about it. As far as I know, Rust is supposed to solve the problems of C and C++ without being slower.
Not necessarily, there are also Native AOT.
However, this should still be a little behind.
Basically, all compiler languages are, so they should not differ significantly in speed. That is, the code is converted into machine code, it is not faster.
Rust is a modern language and certainly interesting, but you don’t have to know it. Depends on what you do. Of the languages I would most recommend C# because most widely used.
Thank you.)
Seriously?
Compared to Rust, that’s true.