A Profiling-Based Approach to Type Specialization for Dynamically Typed Languages

Dynamic typing brings convenience to programming but also poses challenges for compilers to generate efficient code. We propose a profiling-based method that collects type information by warming up and running JavaScript programs. By monitoring the program execution and recording the type information of bytecode and variables, a rule-based type inference scheme and a supplementary solution supporting JavaScript source code are presented. With static program analysis and the JavaScript type system, constraints and inferences are applied to variable types to generate more accurate and reliable type information. This paper implements a type inference system that takes JavaScript source code as input and outputs type information files. Experiments on benchmarks such as SunSpider show that, compared with WebAssembly binaries compiled without type information, those with type information achieve an average performance improvement of 6.18% and a maximum performance improvement of 58.9% in execution efficiency.

Authors

Publication Details

Journal
International Journal of Software Engineering and Knowledge Engineering
Published
2026-10-13
DOI
https://doi.org/10.1142/s0218194026420027
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Profiling-Based Approach to Type Specialization for Dynamically Typed Languages

Xiaohua Shi, Ziye Li, Haonan Guo, Hao Hao
International Journal of Software Engineering and Knowledge Engineering
Logic, programming, and type systems
article

A Profiling-Based Approach to Type Specialization for Dynamically Typed Languages

Xiaohua Shi, Ziye Li, Haonan Guo, Hao Hao
article en

Abstract

Dynamic typing brings convenience to programming but also poses challenges for compilers to generate efficient code. We propose a profiling-based method that collects type information by warming up and running JavaScript programs. By monitoring the program execution and recording the type information of bytecode and variables, a rule-based type inference scheme and a supplementary solution supporting JavaScript source code are presented. With static program analysis and the JavaScript type system, constraints and inferences are applied to variable types to generate more accurate and reliable type information. This paper implements a type inference system that takes JavaScript source code as input and outputs type information files. Experiments on benchmarks such as SunSpider show that, compared with WebAssembly binaries compiled without type information, those with type information achieve an average performance improvement of 6.18% and a maximum performance improvement of 58.9% in execution efficiency.

International Journal of Software Engineering and Knowledge Engineering
Openalex Percentile: Top 13%
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.