производительность

Why does "1000000000000000 in range(1000000000000001)" work so fast?

As far as I understand, the range() function, which is actually a object type in Python 3, generates its contents on the fly, ... the question why is 1000000000000000 in range(1000000000000001) so fast in python 3 from the participant @RicksupportsMonica

How to build stack traces of specific threads with sample interval ± 100ms

There is OpenJDK8. There is a pool of ExecutorService threads, for example, size 40. The principle of operation is as follo ... ate -i 100ms, the withdrawal occurred approximately once per second and the RMI thread consumed one CPU core per second. 90%.

Number of combinations (from n to k) is there a fast algorithm? Python

The number of combinations can be found using recursion and, accordingly, the recurrence relation. The code turns out like th ... t()))) But I know that recursion is not fast and not always reliable. Are there any other algorithms and how fast are they?

The fastest implementation of Dijkstra's algorithm in javascript

A weighted graph is given. You need to solve 2 problems: find the length of paths from the starting point to all points and a ... tions that I have attached links to above, and from these optimizations they will work quickly, I will also be very grateful!

Why not use the Pow function for integers?

P.s. If anything, I'm talking about the C++ Pow function. I have often come across recommendations like "do not use the Pow f ... en due to the fact that Pow is implemented not binary, but linear? (this one, by the way, I don't know if it's binary or not)

Dictionary in C++ as (Dictionary) in C#

There is a surprisingly fast dictionary in C#, I would like to know if there is such a productive one only in C++ ? I tried i ... is several times lower than that of Dictionary sisharpovsky... P. S: The pair has the form <unsigned int, unsigned int>

How to keep track of where the memory goes?

How to track where RAM goes? And where to look when 500mb of RAM is immediately spent at the start? The most doubtful entry ... nt = a.Sum(e => e.Balls) }).OrderByDescending(a => a.Point).ToList(); Is it possible to optimize this somehow?

C++ size of char arrays [closed]

Closed. This question is off-topic. Answers to it are not accepted at the moment. ... Hi! Why are the sizes different? And is it possible to save memory in this way by using const* char?

What is dns-prefetch and x-dns-prefetch-control?

I decided to study the topic of meta tags in more detail and came across these tags: <meta http-equiv="x-dns-prefetch-control" content="on"> <link rel="dns-prefetch" href=""> How do they work and what task do they solve?

About the processing speed of list generators in Python

Faced with a huge difference in performance depending on how the list generator is passed. I'm trying to figure out the reaso ... ccurs the difference is an order of magnitude between any([ ]) and any (list ( )) and between sum ([]) and the other options.

High CPU usage by the system in Linux. How do I find out why?

(source: joxi.ru)(source: joxi.ru) Sometimes we have a high CPU load of some system tasks. Not the processes from userland, b ... eft, and the load is still there. Here I want to find some means to quickly and accurately find out what loads the processor.

PHP Interpreter load

A few questions for people who understand the PHP interpreter well. Does the number of opening descriptors affect the scrip ... on uses less resources, if at all, there is a difference? This: <? echo '$value'; ?> Or this one: <?=$value?>

How can I track the execution time of each of the functions and the total execution time of the program

There is a code with three sotrirovkami, there is a report on the execution time of the program. How can I track the executio ... tion(ary)), insertion(ary)[:5]) print (len(bubble(ary)), bubble(ary)[:5]) print ("{:g} s".format(time.clock() - start_time))

How do I filter Map() values in JS?

I have a Map (), how can I check this collection if it contains an element that contains a specific character? If in other wo ... ; array[j] = user; j++; }); var input = $('#search').val().toLowerCase(); var filteredList;

Does the browser slow down, possible reasons?

The application is written in PHP + JAVASCRIPT The page displays about 2000 lines or more (if it displays a little - about 1 ... the screen and there is no display:none style in the wrapper; the alert() function executes quickly, as expected )) Amazing!

char/varchar-length in bytes or characters?

On some board, I read that *char differs from *text in that the first one measures the length of in characters, and the secon ... out that if there is at least one variable-length field in the table, all fields char are automatically converted to varchar

How do I find out which method is more CPU-intensive?

There are several implementations of MD5, for example. Finding out which method is faster is not a problem. How to correctly find out which of these methods gives a greater load on the processor?

Slow code execution - flipping a coin a billion times

Such, for example, code for only a billion iterations runs for an hour (60 minutes) - what am I doing wrong? import random ... if coin > 0: reshka += 1 else: orel += 1 i += 1 print('reshek', reshka, 'orlov', orel) input()

Performance comparison of standard Delphi compilers, pascalABC.net and C++

Once again, another student with burning eyes announced that " everything we have written in Delphi is slow and ugly, and if ... understand how well he did his job. To do this, it would be nice to compare its results with those already available, if any.

The difference in the work of the iPad and Android emulators

Why does the application (Objective-C) run faster on the iPad emulator than on the device itself, while the Android emulator (Java application) runs slower than on the device?