« cl-modlisp | Main | Webactions »

Current UMLisp Benchmarks

I've written about my benchmarks and optimization efforts for my UMLisp library. Last month I spent a fair bit of time with Allegro's profiler. I optimized routines which used significant amounts of time. In some cases, this involved rewriting built-in Lisp functions with my own optimized replacements. So, my kmrcl library now has functions like prefixed-fixnum-string. No exactly what I wanted to do, but that optimized routine was many times faster than a frequently used invocation of (format nil "C~7,'0D" id).

Below are the initial and current print benchmarks. While I've previously lamented AllegroCL's speed, AllegroCL is now the fastest on the print benchmark. Its top rating was helped, no doubt, by using its profiler to guide my optimizations.

ImplInitial TimeCurrent TimeIncrease
AllegroCL 6.28.20.79930%
CMUCL 18e+2.21.2576%
Lispworks 4.2.75.81.97190%
SBCL 0.8.1.302.81.6471%
SCL 1.1.15.11.7200%

Comments (4)

Paul Dietz:

Don't you mean (format nil "C~7,'0D" id)?

Yes, I've added the missing comma -- thanks.

Don't you find that philosophically this is a bad idea? I'd have thought that this is what bug reports to vendors are for: rather than uglifying your own code, make the compiler smarter.

Admittedly, I don't know what the cost to a user of making a support request like this is; but probably the vendors want to know where they're 10 times slower than the competition and where their environments are proving the bottleneck.

Also I concede that there's value in making it fast now, rather than in the next release of whatever Lisp it is; still, you increase the fragility of your own code because of an environmental shortcoming that is by no means universal, and in the software world, it's usually possible to fix the environment.

(oh, and "it's" is not a possessive :-)

Well, yes or no.

I don't expect FORMAT to be fast as the highly optimized, highly specialized function of PREFIXED-FIXNUM-STRING. Also, most of the changes weren't truly uglifactions. As an example, I initially cached the formatting of an object as a computed format control string and a function that produced the values of that object to use with format. That made the work of the printer function a bit harder having to extract two bits of data and then multiple-value-call with format. The new approach avoids format and compiles a sequence of forms to write the object components. while this involves more code in the format compiler, the printer's job is now easier because it just has to funcall the print function with the object and a stream.

The 10x speed on Allegro was due to a number of changes. As far as bug reports go, I agree they have value. I've already worked on this issue with Franz. They recommended using FORMATTER, but I'm happy with the changes that avoided the use of FORMAT.

As for the gratuitous apostrophe: thank's ;-)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on July 11, 2003 12:04 AM.

The previous post in this blog was cl-modlisp.

The next post in this blog is Webactions.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.