R
R
Roman Yermolin2018-12-04 23:59:05
code review
Roman Yermolin, 2018-12-04 23:59:05

Are there services for evaluating code/algorithms?

Good day.
I thought: are there online services for calculating the running time and spent code memory on different PLs?
It is convenient to prepare for the Olympiads and, in general, work with a textbook on algorithms.
If someone knows, please share.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
asd111, 2018-12-05
@asd111

It seems that all competitive sites have it. On the same topcoder and code forces and leetcode.

V
Vladimir Proskurin, 2018-12-05
@Vlad_IT

Everything is relative, a lot of parameters influence - compiler / interpreter optimization, processor / memory performance, overall system operation, etc. You can only see the difference with respect to another algorithm. For JS, I use this https://jsperf.com/ but it's much more convenient to measure the time/memory of the required section of code using the language itself. Another JS example

console.time('algo1');
//.. алгоритм 1
console.timeEnd('algo1');
console.time('algo2');
//.. алгоритм 2
console.timeEnd('algo2');

as a result, two lines will be displayed with the execution time of each algorithm. Other languages ​​have their own measurement tools.
It is even more convenient to use the profiling tools in the IDE or runtime (for JS in chrome, the Perfomance tab).

S
stratosmi, 2018-12-05
@stratosmi

on different EPs?

So and still there is an optimization by compilers-translators.
It's not so much about the language, but about the specific implementation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question