The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Pathname2, an ode to speed

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Daniel Berger

Posts: 1383
Nickname: djberg96
Registered: Sep, 2004

Daniel Berger is a Ruby Programmer who also dabbles in C and Perl
Pathname2, an ode to speed Posted: Dec 14, 2005 7:02 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Daniel Berger.
Original Post: Pathname2, an ode to speed
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Daniel Berger
Latest Posts From Testing 1,2,3...

Advertisement
A short while back, the slightly wacky Trans mentioned that Pathname was rather slow at certain operations. While I normally don't care about speed, I decided to bench my own version of Pathname just to see how it faired.

It kinda sucked, really.

Not a big deal, though. I mean, seriously, how often are you calling Pathname#descend anyway? Probably not much, so it shouldn't make any difference. Functionality is the key here, right?

Yes, but that won't stop me from doing something crazy like making a C version of the pathname2 package. In fact, it's mostly done. Actually, it's been a rather positive experience. I've discovered a few minor bugs in the pure Ruby version along the way, mostly on Windows, and added a bunch more tests as a result. I've also added destructive and non-destructive versions of a few methods and added a tweak here and there.

The biggest pain is the manual delegation I have to do for some of the classes.

Oh, and yeah, it's fast.

Read: Pathname2, an ode to speed

Topic: Ruby on Rails 1.0 has finally arrived! Previous Topic   Next Topic Topic: Shameless Self Promotion and Ruport News

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use