

The overall CPU usage goes down suddenly at the end of the task after optimization.

The following screenshots show the CPU usage before and after optimization while searching a very large file for a regular expression. To overcome this situation, I optimized the code so that v22.5 will dynamically manage thread load balancing. Nevertheless, the existence of P-Cores and E-Cores could exacerbate the situation. Just for clarification, thread speed could fluctuate even without E-Cores and P-Cores for instance, if a thread is interrupted by a background app or system process, the thread will become slower than other threads. If a P-Core thread runs faster than an E-Core thread, P-Core threads finish their task earlier than E-Core threads and need to wait for E-Core threads to finish their task. All previous versions of EmEditor assumed that all threads run at the same speed. This new architecture is interesting because a P-Core runs faster than an E-Core.

Since the 12th Gen Core processors, Intel has introduced a hybrid architecture that combines P-Cores for performance and E-Cores for efficiency. I recently bought a PC with a 13th Gen Intel Core i7-13700.
