Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interpreter. Systems such as RPython and GraalV...
详细信息
Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interpreter. Systems such as RPython and GraalVM provide components such as a garbage collector and just-in-time compiler in a language-agnostic manner, greatly reducing implementation effort. However, meta-compilation-based language implementations still need to improve further to reach the low memory use and fast warmup behavior that custom-built systems provide. A key element in this endeavor is interpreter performance. Folklore tells us that bytecode interpreters are superior to abstract-syntax-tree (AST) interpreters both in terms of memory use and run-time performance. This work assesses the trade-offs between AST and bytecode interpreters to verify common assumptions and whether they hold in the context of meta-compilation systems. We implemented four interpreters, each an AST and a bytecode one using RPython and GraalVM. We keep the difference between the interpreters as small as feasible to be able to evaluate interpreter performance, peak performance, warmup, memory use, and the impact of individual optimizations. Our results show that both systems indeed reach performance close to ***/V8. Looking at interpreteronly performance, our AST interpreters are on par with, or even slightly faster than their bytecode counterparts. After just-in-time compilation, the results are roughly on par. This means bytecode interpreters do not have their widely assumed performance advantage. However, we can confirm that bytecodes are more compact in memory than ASTs, which becomes relevant for larger applications. However, for smaller applications, we noticed that bytecode interpreters allocate more memory because boxing avoidance is not as applicable, and because the bytecode interpreter structure requires memory, e.g., for a reified stack. Our results show AST interpreters to be competitive on top of m
Current practices in software testing such as Test Driven Development or Behavior Driven Development aim at linking code to expected behavior. In this context, code coverage is widely used to improve code quality, red...
详细信息
ISBN:
(纸本)9783031213878;9783031213885
Current practices in software testing such as Test Driven Development or Behavior Driven Development aim at linking code to expected behavior. In this context, code coverage is widely used to improve code quality, reduce bugs and ssure requirements satisfaction. Even if change tracking software allows finely analyzing code evolution, associating a particular code chunk to the requirements at the origin of the code modification is difficult for a large code base. In this preliminary work, we propose a new "user story coverage" metric that reports lacking requirement coverage quality, to help developers focus their efforts on enhancing unit and integration tests. We propose a methodology to compute this metric in a robust and automated fashion and evaluate its feasibility on open-source projects.
In this paper, a systematic method for automatically generating hierarchical multi-dimensional table lookup models for compact device and behavioral models with any number of terminals is presented. The method is base...
详细信息
ISBN:
(纸本)0769520855
In this paper, a systematic method for automatically generating hierarchical multi-dimensional table lookup models for compact device and behavioral models with any number of terminals is presented. The method is based on an abstractsyntaxtree representation of analytic equations. Expensive part of the computations represented by abstractsyntaxtrees are identified and replaced by two-dimensional table lookup models. An error-control based optimization algorithm is developed to generate table lookup models with the minimal amount of table data for a given accuracy requirement. The proposed method has been implemented in the model compiler MCAST and the circuit simulator SPICE3. Experimental results show that, compared to non-optimized compilation based simulation, the simulation using the proposed table lookup optimization method is about 40 times faster and achieves sufficiently accurate results with error less than 1-2%.
暂无评论