Fwd: [fwd: fast_xs: XChar implementation in C]

2 views
Skip to first unread message

Jamie Orchard-Hays

unread,
Oct 3, 2007, 11:24:50 PM10/3/07
to rub...@googlegroups.com
Cool stuff.

Begin forwarded message:

> From: why the lucky stiff <w...@whytheluckystiff.net>
> Date: October 3, 2007 11:22:32 PM EDT
> To: hpr...@code.whytheluckystiff.net
> Subject: [fwd: fast_xs: XChar implementation in C]
> Reply-To: hpr...@code.whytheluckystiff.net
>
> Thought I would let everyone know about this, in case you want to
> try it out on your own stuff. Hopefully we can merge this into
> Hpricot right away!
>
> ----- Forwarded message from Eric Wong <normal...@yhbt.net> -----
>
> Date: Wed, 3 Oct 2007 18:36:42 -0700
> From: Eric Wong <normal...@yhbt.net>
> To: Jim Weirich <j...@weirichhouse.org>,
> why the lucky stiff <w...@ruby-lang.org>
> Cc: Sam Ruby <ru...@intertwingly.net>
> Subject: fast_xs: XChar implementation in C
>
> Hello,
>
> I had some performance problems with generating some RSS feeds for a
> project I'm working on, and profiling revealed some hotspots in the
> Sam's original XChar conversion code. So I've rewritten it in C and
> overall action times on my RSS feeds are about 10 times faster as a
> result :) (with Rails 1.2.3)
>
> It extends the String class by providing the fast_xs method to it
> (equivalent to to_xs) and is roughly 70 times faster than to_xs.
>
> I've noticed that both Hpricot and Builder::XmlMarkup use Sam's XChar
> implementation. I'm not sure if I should release it as a gem that
> enhances both packages or if I should let you guys (Jim and why)
> package it individually for Hpricot and Builder...
>
> For now, the code is here:
>
> http://bogomips.org/fast_xs
>
> Thanks,
>
> --
> Eric Wong
>
> ----- End forwarded message -----

Reply all
Reply to author
Forward
0 new messages