Kurt Stephens

Nerd Up!

programming

Abstraction .vs. Optimization

Kurt on Mon, 2009-11-30 01:10.

http://www.computerworld.com/comments/node/9141465#comment-553333

Abstractions can lead to greater flexibility and correctness at the expense of speed or size — there are good reasons that most programs are not crafted in machine code.

The key to improving an abstraction’s performance is to compile it. Dynamic environments like Common Lisp are superior to languages and tools like: Java, C++, and C#, in this regard, because one can create abstractions that compile to efficient code.

If the abstraction is cumbersome it might be a poor abstraction or its platform is poor for abstraction. Environments that give seamless access to a language’s compiler from inside the language itself are superior platforms for abstraction.

Ruby: Caching #to_s for immutables (and a possible future for constant-folding)

Kurt on Mon, 2009-11-23 02:07.

Reference: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/26869

I have a proof-of-concept patch to MRI that caches #to_s values for immutable values. It is implemented using a few fixed-size hash tables.

It reduces the number of #to_s result objects by 1890 during the MRI test suite for NilClass#to_s, TrueClass#to_s, FalseClass#to_s, Symbol#to_s, and Float#to_s.

It requires a minor semantic change to Ruby core. This minor change could cascade into a huge performance improvement for all Ruby implementations — as will be illustrated later:

#to_s may return frozen Strings.

TM : The implementation of a real-time, single-threaded, type-segmented, conservative garbage collector

Kurt on Mon, 2008-01-14 00:09.

Introduction

TM is a real-time, non-relocating, conservative, allocator using type- and color-segregated lists, based on Henry Baker’s “Treadmill” allocator. The source code for TM is located at http://kurtstephens.com/pub/tredmill.

TM interleaves marking, scanning and sweeping during each mutator’s call to tm_alloc().

TM attempts to limit the amount of work in the collector to avoid stopping the world for long periods of time. It does not require a separate thread for the collector as all collection activities are interleaved with allocation.

Full documentation is located at: http://kurtstephens.com/pub/tredmill/current/doc/html/index.html

Perl Dead, Long Live Perl?

Kurt on Fri, 2007-08-03 20:33.

Is Perl Dead? Hardly.

http://digg.com/programming/Perl_is_Dead_Long_live_Perl

But, after 16 years of Perl programming, and now working for a Ruby on Rails shop for the past 8 months, I haven’t touched any Perl and I’m happy.

For me, the excitement about Ruby on Rails isn’t Rails, but Ruby.
Ruby is all the things I had always wished Perl was.


Syndicate content

Primary links

Syndicate

Syndicate content

Browse archives

« September 2010  
Mo Tu We Th Fr Sa Su
    1 2 3 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30