IP Library Granted Patent US 9,715,374
Granted Patent B2
US 9,715,374 · App. 14/771,993 · Granted Jul 25, 2017

Multi-branch determination syntax optimization apparatus

Inventors: Makoto Shimamura (Kawasaki, JP); Kei Yamaji (Kunitachi, JP); Mototaka Kanematsu (Yokohama, JP)
Assignees: Kabushiki Kaisha Toshiba; TOSHIBA SOLUTIONS CORPORATION
G06F8/425G06F8/443G06F8/4441G06F9/38
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,715,374
App. No.
14/771,993
Granted
Jul 25, 2017
Kind
B2
Abstract

A multi-branch determination syntax optimization apparatus includes: a memory that retains multi-branch determination syntax including tokens; a database that retains (1) CPU performance information being a parameter depending on a CPU incorporated in the multi-branch determination syntax optimization apparatus and set based on time required for multi-branch determination processing and (2) frequently-appearing token table representing types and rates of appearance of tokens sorted in order of appearance frequency in a query that statically analyzes a source code and performs lexical analysis in advance; and a conversion section that executes determination for the multi-branch determination syntax by referring to the CPU performance information and the frequently-appearing token table, and creates a branch code converted to make a speculatively executable branch for the token type having a high frequency of appearance and to make a branch using the jump table for the token type having a low frequency of appearance.

Claims (20)

1. A multi-branch determination syntax optimization apparatus characterized by comprising:

a memory that retains multi-branch determination syntax including tokens;

a database section that retains CPU performance information and a frequently-appearing token table, the CPU performance information being a parameter depending on a CPU incorporated in the multi-branch determination syntax optimization apparatus and set based on time required for multi-branch determination processing, the frequently-appearing token table representing types and rates of an appearance of tokens sorted in order of appearance frequency in a query that statically analyzes a source code and performs lexical analysis in advance; and

a conversion section that executes a determination for the multi-branch determination syntax by referring to the CPU performance information and the frequently-appearing token table, and creates a branch code converted so as to make a speculatively executable branch for a first token type having a high frequency of appearance and so as to make a branch using a jump table for a second token type having a low frequency of appearance, wherein

the CPU performance information is a value set such that an execution time of a comparison instruction that is executed n times equals an execution time of the jump table, wherein a value of n is set to the CPU performance information and n is a positive integer.

2. The multi-branch determination syntax optimization apparatus according to claim 1 , characterized in that

the multi-branch determination syntax is a switch statement, and

the speculatively executable branch is branch generated by an if-else switch statement.

3. The multi-branch determination syntax optimization apparatus according to claim 1 , characterized in that

the value of n is set by comparing an execution time required for continuous execution of an if-else switch statement and the execution time of the jump table.

4. The multi-branch determination syntax optimization apparatus according to claim 1 , characterized in that

when a ratio of a number of appearances of token to a total number of tokens equals an appearance rate, the value of n is set smaller than a value of m, wherein the value of m is a number of token types up to a total sum obtained by accumulating the appearance rates of the tokens selected in the descending order in terms of the appearance rate first exceeds a predetermined threshold.

5. The multi-branch determination syntax optimization apparatus according to claim 1 , characterized in that the branch code is a branch code written in a high level language.

6. The multi-branch determination syntax optimization apparatus according to claim 1 , characterized in that the branch code is an intermediate code to be interpreted by a compiler.

7. A non-transitory computer-readable recording medium including:

a first file storing multi-branch determination syntax including tokens;

a second file storing CPU performance information which is a parameter depending on a CPU incorporated in the multi-branch determination syntax optimization apparatus and set based on time required for multi-branch determination processing; and

a database file storing a frequently-appearing token table representing types and rates of an appearance of tokens sorted in order of appearance frequency in a query that statically analyzes a source code and performs lexical analysis in advance, and

a program that executes determination for the multi-branch determination syntax by referring to the CPU performance information and the frequently-appearing token table, and creates a branch code converted so as to make a speculatively executable branch for a first token type having a high frequency of appearance and so as to make a branch using a jump table for a second token type having a low frequency of appearance, wherein

the CPU performance information is a value set such that an execution time of a comparison instruction that is executed n times equals an execution time of the jump table, wherein a value of n is set to the CPU performance information and n is a positive integer.

Assignments (3)
CHANGE OF NAME Recorded Feb 8, 2021
From: TOSHIBA SOLUTIONS CORPORATION
To: TOSHIBA DIGITAL SOLUTIONS CORPORATION
Reel/Frame 055185/0728 →
CHANGE OF NAME Recorded Mar 8, 2019
From: TOSHIBA SOLUTIONS CORPORATION
To: TOSHIBA DIGITAL SOLUTIONS CORPORATION
Reel/Frame 048547/0215 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 6, 2015
From: SHIMAMURA, MAKOTO; YAMAJI, KEI; KANEMATSU, MOTOTAKA
To: KABUSHIKI KAISHA TOSHIBA; TOSHIBA SOLUTIONS CORPORATION
Reel/Frame 036979/0582 →
Priority Claims (2)
JP 2013-040932 · Mar 1, 2013 · national
JP 2014-037149 · Feb 27, 2014 · national
Continuity (1)
Related Publication 20150363177A1 · Dec 17, 2015