Thinking until the 2147483648'th second

About This

I think all of the files I linked to in some of my older posts are gone now. I am working on fixing them.

Tuesday, October 9, 2007

Scheme Raytracer Optimized

Marc Feeley, the creator of Gambit Scheme, tweaked my raytracer and got it to run twice as fast. Here's what he said about it:

"The main thing that helped performance is the avoidance of mixed type arithmetic, that is cases when an operator is called with numbers of different types, such as
   (let ((x (sqrt 1.5))) (* x 2))

These mixed-type calls are not handled efficiently. To properly
implement the semantics of Scheme, they are implemented with an
actual function call to the library. Here the (* x 2) will actually
call the "*" function in the library. One transformation I applied
to your code is to convert integer constants to a floating point
value, when the other operand was also a floating point number. For
example:

   (let ((x (sqrt 1.5))) (* x 2.0))
"

Simply changing the numeric operations to use explicit types indeed increases the speed 2.2x. The second and third image in my previous post now only take ~186s to render instead of ~415s. Impressive! If I optimized the math and tweaked it even further, we'll have a pretty fast raytracer on our hands.

Edit: I meant to post the new source code, you can find it here: schemeray-0.2.tar.gz

15 comments:

Will Bendick said...

Hi, can you update the link to code, please? Thanks!

James Long said...

Please refer to http://jlongster.com/software/ to find the source now. Thanks.

Unknown said...

www.monclerdesign.com
Moncler online
Moncler
Moncler Jackets
www.stylemoncler.com
moncler online shop
Moncler
Moncler Jackets
www.doudoune-moncler.net
Boutique en ligne Moncler
veste moncler
doudoune moncler

sara chen said...

Moncler women coat are the most universal items of clothing ever created and are easy to be matched with a simple tank top. And this let many parents are deeply fond of Moncler Jackets, also.

This Moncler shop online
Long Women’s Down Jacket is specially designed for our mums, in view of their elder age and body condition. Its design idea is equipped with best warmth performance, modern shape and be durable, so as to protect the elder as a large extend. Its length can protect the age’s legs well, because their legs are becoming more and more cold- blooded. The two front pockets provide the big convenience with them, to put other accessory into, it also can warm the aged hands perfectly. In addition, its high warmth hood can keep off the cold wind from the order’s head. Its fashion design style is also accord to their temperament.

So if you don’t know how to select a present for her, this Moncler men jackets is a best idea. As in the cold winter, no matter where she can go, she can wear this fashion and warm Moncler jackets with her at all the times. Let’s give great mums’ our deep love.

Medical Blog said...

If I optimized the math and tweaked
it even further, we'll have a pretty
fast raytracer on our hands.

accesorios maquinas de coser said...

Hola amigo, el diseño de su blog es sencillo y limpio y me gusta. Su blog es magnífico. Por favor, mantenga venir. Saluda!

wholesale krill oil said...

Thanks for a nice share you have given to us with such a large collection of information. Great work you have done by sharing them to all. Simply superb

Unknown said...

This article gives the light in which we can observe the reality. This is very nice one and gives in-depth information. Thanks for this nice article.
sleep aid spray

sleep aid supplement

natural sleep aid

Anonymous said...

fN9C5n http://bootsoutletonline.webs.com/ qD5Y1v [url=http://bootsoutletonline.webs.com/]ugg outlet online[/url] lH6Y4t ugg outlets fJ6Y0p
yM5J3f http://www.saclongchampsmall.com rV4K8t [url=http://www.saclongchampsmall.com]sac longchamp[/url] tZ9I0w longchamp pas cher iN7L9w
bR5Q3q http://bootsaustraliaoutlet.webs.com/ oG2Q2a [url=http://bootsaustraliaoutlet.webs.com/]ugg australia outlet[/url] jO8A2j ugg outlet gK0S1u
xH2Y3l http://bootfactoryoutlet.webs.com jV5H5g [url=http://bootfactoryoutlet.webs.com]ugg australia outlet[/url] sR9S4g ugg australia outlet xM5J8w
kF9N9w http://bootssaleonline.jouwweb.nl cM9K1y [url=http://bootssaleonline.jouwweb.nl]uggs sale[/url] zK9O3h uggs classic short cJ5X7f
vN5O8y http://sacsspaschers.info cO0A5v [url=http://sacsspaschers.info]sac longchamp pas cher[/url] zD1J9x sac longchamp pas cher|sacs longchamps|longchamps sac} vL6B9x

Anonymous said...

[url=http://isabellemarrant.yolasite.com/boots-isabel-marant.php]isabel marant jeans[/url]|[url=]isabel marant fall 2011[/url]|[url=]boots isabel marant[/url]

http://isabellemarrant.snappages.com/isabelle%C2%A0marant%C2%A0basket.htm
http://isabelmarant01.webnode.fr/bottes-isabel-marant/
http://isabellemarrant.blogsky.com/1391/02/19/post-2/

Anonymous said...

vK4B0r http://www.lvbagsoutlet2013.com zV1K5z louis vuitton handbags eH1T1n [url=http://www.lvbagsoutlet2013.com]louis vuitton outlet online[/url]
iD7P8g http://www.francesaclouisvuittonn.info lA6X4q louis vuitton pas cher iF6F3d [url=http://www.francesaclouisvuittonn.info]louis vuitton sac[/url]
kC0V3r http://purseshops.webnode.com lW5N7o louis vuitton handbags outlet iE5G3u [url=http://purseshops.webnode.com]louis vuitton purses[/url] aD7J0d
kN7Y5o http://www.outletlvhandbagsus.info eI8G6j cheap louis vuitton eK6R0g [url=http://www.outletlvhandbagsus.info]louis vuitton bags[/url]
qO7H9s http://www.lvsaconline.monwebeden.fr jX5P2p louis vuitton sac mZ3J1w [url=http://www.lvsaconline.monwebeden.fr]louis vuitton sac[/url]
dA1Z2v http://buyhandbagnet.webnode.fr mB3C0e sac louis vuitton pas cher uA4Y7b [url=http://buyhandbagnet.webnode.fr]sac louis vuitton[/url]

Anonymous said...

Tt9Oc5
[url=http://isableingok.webgarden.com/sections/prix-preferentiel-isabel-marant]isabel marrant[/url]
[url=http://buysneakersus.snappages.com/isabel-marant-nueva-creacion.htm]isable marant[/url]
[url=http://isabellemarant.2itb.com/index_1.html]longchamp[/url]

Er7Dz2Rd5Sq7
http://shoesing.yolasite.com/isabel-marant-online.php
http://buysneakersus.snappages.com
http://isableingok.webgarden.com/sections/prix-preferentiel-isabel-marant

Anonymous said...

Tu8Fb6
[url=http://isabelming.blinkweb.com/sac-longchamps1.html]sac longchamp lm[/url]
[url=http://www.ussneakershop.350.com/Isabel_Marant_haut-garde_des_collections.htm]basket compensée isabel marant[/url]
[url=http://shoesing.yolasite.com/isabel-marant-online.php]isabel marant jewelry[/url]

Sk7Fn6Oi4Uk3
http://shoppingnikinhg.yolasite.com
http://isableingok.webgarden.com/sections/prix-preferentiel-isabel-marant
http://isabellemarant.2itb.com/

Anonymous said...

Tr9Kz9
[url=http://isabelmarants.sosblogs.com/isabel-marant-soho-b1/Isabel-marant-paris-b1-c1.htm]www.isabelmarant.tm.fr[/url]
[url=http://isableingok.webgarden.com/sections/sac-longchamps-marque-bien]maroquinerie longchamp[/url]
[url=http://gutianle.tumblr.com/13030802]isabel marant spring summer 2012[/url]

Tw3Rh5Vs4Tq6
http://isabelsneakerus.evenweb.com/sections/isabel-marant-venta-te-espera
http://isabellemarant.2itb.com/index.html
http://isabelmarantshop.hazblog.com/Isabel-Marant-Sneake-b1/Magnifique-Isabel-Marant-sneakers-serie-b1-p2.htm

Anonymous said...

[url=http://sacpliagelongchamps.webnode.fr]sacoche longchamp[/url] 锘? il bouscule les rep猫res visuels et boutique longchamp sociaux.Ici, je voulais que ce soit l'inverse Et pour cause, c'est d'images qu'est n茅e l'id茅e de l'exposition pr茅sent茅e l'茅t茅 dernier dans le cadre des rencontres d'Arles.Ren茅e Le Roux longchamp pliage contre Jean-Dominique Fratoni.Il y en eut pour tout le monde.la chirurgie esth闁爄que.Depuis que je suis enfant, je veux que le monde soit meilleur [url=http://christianstore.webs.com]christianstore.webs.com[/url]

[url=http://longchampspaschers.webnode.fr]sac longchamps pas cher[/url] 锘縠 week-end dernier, les d茅fil茅s cette semaine notamment celui de porte document longchamp Balenciaga , les Victoires de la Musique maintenant.Une livraison le soir-m de votre commande, entre 19h et 22h longchamp sac 脿 main.锘縇e cr茅ateur Nicolas Ghesqui猫re quitte Balenciaga apr猫s 15 ans de collaboration PARIS, 5 nov 2012 - - Nicolas Ghesqui猫re, l'un des cr茅ateurs les plus dou茅s de sa g茅n茅ration, quitte la maison Balenciaga qu'il a contribu茅 脿 faire revenir sur le devant la porte monnaie longchamp sc猫ne, apr猫s 15 ans de collaboration, annonce la mais.
[url=http://sacpliage.webnode.fr]longchamp sac[/url] 锘縮 1001 b茅sicles Il 茅tait une fois, au temps des Egyptiens, sac homme longchamp des Grecs et des Romains, le n茅ant.Ou bien 锚tre recycl茅 en torchon ou bavoir.Promenade (where you could hear the sound of tropical rainfall) gave way to Tapis de Lecture (the piles of books that are source material for her fictions) and then to Panorama.sac bandouliere longchamp Un tweed en trompe-l'艙il provient de broderies compress茅es.Thanks for longchamps maroquinerie sharing your opinions on this subject blog.锘縋uriste de la mode
[url=http://www.isabellemarantshopfr.info]isabel marant[/url] J'ai 3 enfants (16,11 et 7) et je fumais lorsque j'attendais mon 1er.Top : On peut acheter et aussi louer.Pour consulter les taux de conversion les plus r茅cents, veuillez utiliser le Convertisseur universel de devises Cette page a buy isabel marant 茅t茅 mise 脿 jour le: 08-mars 08:44.je ne sais plus quoi penser.J'avais isabel marant perkins 11 ans.I.
[url=http://isabelbaskets.webnode.fr]isabelbaskets.webnode.fr[/url]

Random Notes

I work at Coptix

Ideas / To-do

  • Research .Mac style photo gallery for screenshots