S
S
Stepgor2019-10-09 02:05:11
Node.js
Stepgor, 2019-10-09 02:05:11

How is 'performance' jap defined?

I'm relatively new and I have a question about jap performance. Let's take js and c#. We make a cycle up to a million in them and we get that c # spends less time executing this cycle, can we assume that Sharp is productive? If there are useful articles on this topic, I will be grateful.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
mahmudchon, 2019-10-09
@mahmudchon

Read about assembler right away , don't waste time on these two.

I
index0h, 2019-10-09
@index0h

As a rule, productivity is not measured in an abstract vacuum, in isolation from the task.
Going through a cycle of 1k iterations without operations inside - JIT will most likely delete this cycle altogether and you will get false data.

S
SagePtr, 2019-10-09
@SagePtr

In your case, it will turn out to be more productive in a synthetic test, but in real conditions it is far from certain that it will turn out to be more productive. You need to start from real tasks and real data, in different cases the results can differ significantly and there may not be a clear "winner" (except for assembler, of course, because it allows full control over the generation of executable code, but with one caveat - with provided that the author of the program is smarter than the optimizer built into the compiler)

G
GavriKos, 2019-10-09
@GavriKos

In the case of these two specifically, there is no performance of the PL. There is the performance of the environment that executes the code - JIT and that's it. And they are different for these languages.
If you take Unity in general, in which there is also a seasharp, then suddenly you will get a completely different result - because there may not be anything left from the seasharp. That's an example.

G
Griboks, 2019-10-09
@Griboks

Usually, benchmarks are used - a series of special tests. The Internet has their results, implementations for individual languages, and even algorithms for specific tests.
For example, if we want to see graphics performance, we can draw a million flying balls and compare fps. Or compare optimization through the launch of specially prepared shit code. Or find the first 1000 prime numbers. Or perform vector operations on a large sequence of data. Or all together.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question