[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] is case-lambda expensive?
From: |
Matthew David Parker |
Subject: |
[Chicken-users] is case-lambda expensive? |
Date: |
Wed, 24 May 2006 12:25:01 -0400 (EDT) |
Hi I've got functions for my SDL layer that I want to put like this:
(define msdl.pixel
(case-lambda
(() (printf "(msdl.pixel x y rgb alpha [img])\n"))
((x y rgb alpha)
(R_msdl.pixel (int x) (int y) (int rgb) (int alpha) 0))
((x y rgb alpha img)
(R_msdl.pixel (int x) (int y) (int rgb) (int alpha)
img))))
This way the user can type in:
> (msdl.pixel)
(msdl.pixel x y rgb alpha [img])
so that it's easy to see how to use the command. However, if there is
some program where the user wants to draw 1000 pixels quickly, will the
case-lambda make it significantly slower?
Thanks,
Matt
(btw, "msdl" is just a temporary name, as there is already an "msdl" for
SDL)
- [Chicken-users] is case-lambda expensive?,
Matthew David Parker <=