DocumentCode :
1357346
Title :
Optimizing C++ vector expressions
Author :
Blinn, James F.
Author_Institution :
Microsoft Res., USA
Volume :
20
Issue :
4
fYear :
2000
Firstpage :
97
Lastpage :
103
Abstract :
Recently, I´ve been entertaining myself by studying all the nifty new programming techniques that have been invented since I was in school. I started with C++ and object-oriented programming. I´m now progressing through generic programming, aspect-oriented programming, partial evaluation and generative programming. What I´m really interested in is whether all these tricks work in the real world of graphics programming. My answer so far is “Yes, but...”. To see “but what?”, I define one of the problems I want to solve in in this article. I wanted to have a programming language that defined vectors and the arithmetic operations between them. C++ allows me to do this, but there are various pitfalls in doing this well. This article addresses one of these pitfalls: the speed of execution of vector arithmetic. The conventional approach turns out to be somewhat slow, but there´s a very tricky technique that can make vector arithmetic very fast. It´s based on the work of T. Veldhuizen (1998) and uses the C++ template mechanism in bizarre and unexpected ways
Keywords :
C++ language; arithmetic; computer graphics; mathematics computing; object-oriented programming; optimisation; software performance evaluation; vectors; C++ template mechanism; C++ vector expression optimization; arithmetic operations; aspect-oriented programming; execution speed; generative programming; generic programming; graphics programming; object-oriented programming; partial evaluation; programming language; vector arithmetic; Arithmetic; Books; Optimizing compilers; Software engineering; Testing; Timing; Writing;
fLanguage :
English
Journal_Title :
Computer Graphics and Applications, IEEE
Publisher :
ieee
ISSN :
0272-1716
Type :
jour
DOI :
10.1109/38.851757
Filename :
851757
Link To Document :
بازگشت