K
K
Kizzeon2019-12-01 03:45:44
Windows
Kizzeon, 2019-12-01 03:45:44

What programming language is suitable for writing a high-performance application on Windows?

There was a need to write an application on Windows that will work with large amounts of text (replace text in 50,000+ lines of text with a regular expression, etc.) and I can’t understand which programming language is best suited for such tasks and which one they are the best to study.
Before that I studied Javascript and PHP. But their performance is not enough for me.
The priority of my requirements for the language:
1. The lower the load on the processor, the better (it is desirable that the executable code could "run for a long time but stably", that is, without crashes at 100% CPU load)
2. Zhor RAM when reading a text file 100 megabytes is not more than 1-1.5 GB
3. Not too high entry threshold

Answer the question

In order to leave comments, you need to log in

8 answer(s)
#
#, 2019-12-01
@mindtester

the answers are more than obvious, in order of performance priority:
- C++, D
- Rust, Go
- even C#
.. here are just wishes

programming language ... for writing a high-performance application on Windows
and
Not too high entry threshold
are the exact opposite
ps a drop of lyrics
даже мой любимый C#, если добавить немножко ускорителей
https://habr.com/ru/company/clrium/blog/467663/
https://habr.com/ru/post/443804/
.. но это точно не сразу за порогом вхождения
pps I would recommend D, especially since there is a plugin for VS
ppps here scripting languages ​​advise and criticize regular expressions .. and this is more than true. regular expressions are too versatile to be fast. regular expressions in scripting languages ​​- multiply by the speed (more precisely, the brakes) of interpreters. on the same sharp (without low-level feints), but by a simple search on the pattern of the beginning of the fragment, and the end (yes, the task was not difficult)), I got something like a tenfold overtaking of regular expressions, the sharp itself))
.. conclusion - if you get into programming .. really do. and it’s true, both in php and js, you will get overtaking regular expressions, probably also by an order of magnitude. and if you don't understand how to process strings, no language will save you. in any language you can write the slowest program))

D
dollar, 2019-12-01
@dollar

For example Rust or C++.
Why not?
As for the performance of regular expressions, I would argue. The fact is that regular expressions are a universal tool, and it is not free. It is much more productive to make your parser subject to the text restrictions that you know about. For example, if a piece of text has a clear marker, then you can find it with the simplest substring search. And then to the found piece also apply some kind of algorithm optimized specifically for this text.

S
Stalker_RED, 2019-12-01
@Stalker_RED

A high-performance program for processing text with regular expressions already exists (more than forty years), and is called sed .
You can run it in a virtual machine, or in that Linux subsystem that is screwed to Windows , or using cygwin , or someone even assembled sed directly under windows , go nuts!

I
index0h, 2019-12-01
@index0h

Yes, it’s possible to write this on a heap of everything, including js. You can look in the direction of go, learns in a week, is quite productive

I
Ilya, 2019-12-01
@sarapinit

If the text is in a file, then you can make a regular expression replacement using standard powershell tools.

G
Game Master, 2019-12-01
@baitarakhov

If you need simplicity and high performance of a programming language, then try Nim , you can also look towards Cython

N
Nordman99, 2019-12-01
@Nordman99

Before that I studied Javascript and PHP. But their performance is not enough for me.

Apparently poorly studied since it is not enough with modern multi-gigabyte RAM and multi-core computer processors
this is bullshit for any language, it's just a matter of convenience
And how do you want to perform complex calculations without loading the processor?
so you process your text file not all at once, but in pieces, of course, if you just open the file for processing and start working with it, it can be completely loaded into RAM, and plus here are the results of its processing and, as a result, the RAM zhor will come out , but you need to open the file using the same JS or PHP, but load it for processing in parts - say, several MB, processed it, uploaded it to the resulting file, read the trace of several MB, etc.
And so the fastest languages ​​​​will be C and C ++, learn them and you will have speed, but they have a high entry threshold, and they are the most inconvenient of all, since there you have to manually do many things about which in higher-level interpreted languages, such as JS and PHP, you had no idea, if you don’t want to get involved with this, then study either Python or Lua - in them, as well as in all other high-level interpreted languages, you can do everything you need, but Python, although very convenient and advanced but not always pleased with the speed, Lua in my opinion is much faster and more convenient, especially when executed by the LuaJit interpreter, its speed probably surpasses all other interpreted languages ​​​​and is comparable to C / C ++, but it is very specific

A
Alexander Skusnov, 2019-12-01
@AlexSku

But what if MatLab or Haskell and parallel computing on the video processor?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question