Doug's Compendium of Stuff


Where Is Doug?
My Bookmarks
My Resume
Pacbell Outages
Pilot Logbook


Ruby B-Tree
Jar Search
DCT6200 Firewire Tuner (For Motorola DCT6200 set top box and Freevo)
Serial Port Tuner (For Motorola DCT2XXX set top box and Freevo)
Gentoo IVTV Ebuild
Java Internet Jukebox


2010: 02
2009: 12 11 10 09 08
2008: 12 09 08 07 03 02
2007: 12 08 07
2006: 12 06 02
2005: 11 10 07 06 05 04
2004: 07 06
2003: 10 08 07 05 04


My Wife
My Trainer
My Work



The Few, The Proud, The Pradipta 416

Minimum Enclosing Circle in node.js


After hearing about all the hype surrounding node.js, I decided to test it's raw power by porting the code I wrote to solve the minimum enclosing circle (MEC) problem in Ruby a couple of years ago (Solution in Ruby to the MEC Problem). I also benchmarked the MEC code against various Ruby implementations.

Here are the results:

It is probably my crappy implementation, but for long running cases, the code really breaks down. It tracks the Ruby 1.9.1 performance through 1000 points or so, then falls off a cliff. I assume my implementation is creating too much garbage but haven't really had time to dig in to figure out why.

This benchmark is really garbage anyway for node.js -- heavily CPU intensive tasks are not what it was designed for. Most web applications involve blocking IO operations and the evented model of node.js will really shine in that environment.

As an exercise in JavaScript, this was fun. As a measure of node.js performance, it wasn't really useful.

Source code is here. Or you can download it here: mec.js.

Locations of visitors to this page