In a place where your fantasy can roam free, there won't be any boundaries to what your imagination can create.
Misha’s Tech Playground
graphics, fun and code play
I'm crazy - but who cares? My ideas are constantly dwelling and this is the place for them to pour out and form into something good. Only active participation will ultimately make this place come to life.
Experimental Javascript
Javascript Benchmark
While it my not make a big difference for most people, I care about the performance of the code I write. Somtimes there are multiple ways to get to the same result, butto find out which way is better is not always easy.
Sometimes you’ll probably decide to use a certain function or concept because it is easier to implement or read, but that doesn’t necessarily make it faster to interpret for your browser.
To have some aid in what I do I developed a small Javascript Benchmark.
Searching through the internet I found some benchmarks that test the performance of Interpreters themselves but rarely one that is intended to compare performance of different functions or concepts. If you find it in anyway useful feel free to use it. Though there is no guaranty that the results are correct measures.
Javascript Starfield
Back in the days of my trusty Atari 800 or later my Amiga, a starfield animation was a very popular effect. Unlike the Starfield screensaver that later shipped with versions of Microsoft Windows these starfields were depicted from the side as if you flew by and not into it.
Trying to replicate this vintage look I quickly found out that Javascript and DOM might not be the ideal companions to do so. While the effect is quite nice in my opinion, the processor load to calculate the 150 stars’ position is quite high. Maybe I should look into SVG and the canvas tag to replicate this effect and probably have less processor load.
For the time being check out this probably first serious Javascript experiment of mine I did early in 2007.
Tags: code performance, starfield effect
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
Leave a Reply