版权所有:内蒙古大学图书馆 技术提供:维普资讯• 智图
内蒙古自治区呼和浩特市赛罕区大学西街235号 邮编: 010021
作者机构:Univ Karlsruhe Dept Comp Sci D-76128 Karlsruhe Germany
出 版 物:《CONCURRENCY-PRACTICE AND EXPERIENCE》 (并行学和计算:实践与经验)
年 卷 期:2000年第12卷第6期
页 面:477-491页
核心收录:
学科分类:08[工学] 0835[工学-软件工程] 0812[工学-计算机科学与技术(可授工学、理学学位)]
主 题:complex numbers Java primitive type source-to-source transformation evaluation order
摘 要:Efficient and elegant complex numbers are one of the preconditions for the use of Java in scientific computing. This paper introduces a preprocessor and its translation rules that map a new basic type complex and its operations to pure Java, For the mapping it is insufficient to just replace one complex-variable with two double-variables. Compared to code that uses Complex objects and method invocations to express arithmetic operations, the new basic type increases readability and it is also executed faster. On average, the versions of our benchmark programs that use the basic type outperform the class-based versions by a factor of 2 up to 21 (depending on the JVM used). Copyright (C) 2000 John Wiley & Sons, Ltd.