June 4th, 2009

Chipz vs. YA Deflate

Pierre Mai released his new deflate inflating library yesterday, so I did little bit of testing against Chipz. On my Core 2 Duo system with 64-bit SBCL, Chipz is about 25% faster at inflating. Pierre says his program is "...for those who need something with a less restrictive license or better performance than is currently freely available", but it seems to me that the main advantage over Chipz is that it has a very simple interface and lives in a single file.

I didn't try it against inflate.cl because that file was recently updated and uses Allegro CL-specific code now.

Also, when fiddling around making a test file, I was pleased to see this:

(time (salza2:gzip-file "kjv10.txt" "kjv10.salza2.gz"))
Evaluation took:
  0.546 seconds of real time
  0.540000 seconds of total run time (0.540000 user, 0.000000 system)
  98.90% CPU
  981,743,175 processor cycles
  279,984 bytes consed
$ time gzip -c kjv10.txt > kjv10.gzip.gz

real    0m0.624s
user    0m0.630s
sys     0m0.000s

But sad to see this:

$ ls -l kjv10.*.gz 
-rw-r--r-- 1 xach xach 1403140 2009-06-04 06:52 kjv10.gzip.gz
-rw-r--r-- 1 xach xach 2014735 2009-06-04 06:52 kjv10.salza2.gz

It's not so hard to be fast when you do a bad job. :)

Survey: Do you use the "2" in Lisp-2?

I came across this approximate statement today:

Lisp-2 programmers avoid using the same names for functions and variables.

That didn't sound right to me. I use Common Lisp, and I couldn't come up with any personal examples of avoiding that practice. I also couldn't remember actively thinking about the issue at all; I just use whatever variable names seem natural.

Then I tried to think of examples when I did use variables with the same name as a function: I often use the variable name list, and I often have variables with the same name as a slot accessor (I don't use the foo-of convention). But it hasn't been an active, conscious decision when writing, and it doesn't jump out at me when re-reading as some kind of clash.

So my survey question is this: Are you are a Lisp-2 programmer, and do you avoid using the same names for functions and variables? Let me know.

update Here is a short summary of the results.