Device and method for improving running efficiency of source file

A technology of operating efficiency and source files, applied in software engineering design, program control design, instruments, etc., can solve problems such as neglecting machines, and achieve the effect of improving operating efficiency

Inactive Publication Date: 2016-08-03
PHICOMM (SHANGHAI) CO LTD
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Most of the existing technologies start from the perspective of developers. It is recommended that developers add comments, name as intuitively as possible, and use multiple design patterns, etc., but ignore that machines are unconscious

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
  • Device and method for improving running efficiency of source file
  • Device and method for improving running efficiency of source file
  • Device and method for improving running efficiency of source file

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] A method to improve the running efficiency of source files, such as figure 1 shown, including:

[0039] The extraction step extracts a temporary variable in a method body in the source file;

[0040] Judging step, judging whether the temporary variable is a repeated variable, if not, then entering the optimization step;

[0041] In the optimization step, the names of the temporary variables are replaced one by one by optimized variable names, and the optimized variable names are characters arranged in order.

[0042] As an example of this embodiment

[0043] Record all method bodies in the source file, and traverse each method body in turn.

[0044] Specifically, record all method bodies in the source file, traverse each method body in turn, and extract all temporary variables in a method body. After the optimization step is completed, the next method body is looped until all method bodies are optimized in turn.

[0045] Such as figure 2 As shown, the specific ste...

Embodiment 2

[0100] A device to improve the operating efficiency of source files, such as Figure 5 shown, including:

[0101] The extraction module is used to extract a temporary variable in a method body in the source file, and output the temporary variable to the judgment module;

[0102] Judgment module, used to judge whether the temporary variable is a repeated variable, if not, then output the temporary variable to the optimization module;

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 device and a method for improving the running efficiency of a source file. A temporary variable in each method body is extracted from a source code in sequence, the name of the temporary variable in an original code is replaced by a brief name, and a single character is preferred to select the brief name. The optimization of the source code is carried out through such a method, the running efficiency of a code in a virtual machine can be improved, and moreover, an influence is not caused to the programming complexity of a programmer. Meanwhile, in order to protect that a member variable cannot be replaced by mistake, the content of protecting the member variable is added. By using the scheme, on the premises that the work complexity and efficiency of the programmer are not influenced and further the running of a program cannot be influenced, the running efficiency of the source code is improved.

Description

technical field [0001] The invention relates to the field of source file operation optimization, in particular to a device and method for improving source file operation efficiency. Background technique [0002] With the popularity of high-level programming languages, the amount of project code becomes more and more complex as the business becomes more complex, and the number of source files continues to rise. In order to facilitate memory, the programming styles of different developers are often quite different. This is more obvious in variable naming. Generally, beginners prefer concise ones because there are not too many reference relationships, while more people like variable names to be complicated and named in the way of patchwork of words, which is easy to read and understand. Usually, the variable name (or parameter name) named by the developer is a word with certain meaning, or a word combination, and there must be more than two letters. Of course, we encourage the...

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): G06F9/45
CPCG06F8/443G06F8/4441
Inventor 周维
Owner PHICOMM (SHANGHAI) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products