Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and system for solving multi-thread problem caused by CPU optimization

A multi-threading and threading technology, which is applied in the directions of parser generation, program code conversion, software engineering design, etc., can solve problems such as multi-threading result abnormalities, and achieve cross-platform portability, program development time saving, and strong versatility Effect

Pending Publication Date: 2019-10-25
WUHAN DOUYU NETWORK TECH CO LTD
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of the defects in the prior art, the purpose of the present invention is to provide a method for solving the multi-thread problem caused by CPU optimization, which can effectively solve the problem of abnormal results caused by multi-thread caused by CPU optimization, and is safer and more reliable

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for solving multi-thread problem caused by CPU optimization
  • Method and system for solving multi-thread problem caused by CPU optimization
  • Method and system for solving multi-thread problem caused by CPU optimization

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

[0026] see figure 1 As shown, the embodiment of the present invention provides a method for solving the multithreading problem caused by CPU optimization, including steps:

[0027] S1: When the program code includes several independent functional functions, set thread affinity for each functional function, so that all functional functions run in the same thread when performing CPU optimization;

[0028] S2: Perform CPU optimization on the program code.

[0029] In the embodiment of the present invention, thread affinity refers to setting a certain thread to run on one CPU. When there are multiple functional functions, all the multiple functional function threads are set in the same CPU. Make all functions run in the same thread when performing CPU optimization.

[0030] The method for solving the multi-threading problem caused by CPU optimi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for solving a multi-thread problem caused by CPU optimization, and relates to the field of internet application development. The method comprises the following steps:when a program code comprises a plurality of independent performance functions, thread affinity is set for each performance function, so that all the performance functions run in the same thread whenCPU optimization is carried out. According to the method for solving the multi-thread problem caused by CPU optimization, the problem of result abnormity caused by multiple threads caused by CPU optimization can be effectively solved, and the method is safer and more reliable.

Description

technical field [0001] The invention relates to the field of Internet application development, in particular to a method and system for solving the multi-thread problem caused by CPU optimization. Background technique [0002] Usually a compiler is a program that translates "one language" into "another language". When writing program code in C++ language, it is usually necessary to use a C++ compiler to compile the C++ program code and convert it into the final Executable program. Moreover, C++ compilers generally have various compilation options, among which the optimization option is a commonly used compilation option. [0003] There are many compiler optimization options. Common compiler optimizations include: function embedding, useless code deletion, standardized loop structure, loop body unrolling, loop body merging, splitting, array filling, etc. Among them, the optimization of useless code deletion refers to the fact that the C++ compiler believes that some code lo...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41G06F8/30
CPCG06F8/443G06F8/37
Inventor 杨亮陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD