bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61660: [feature request] optimization of case-lambda


From: lloda
Subject: bug#61660: [feature request] optimization of case-lambda
Date: Mon, 20 Feb 2023 18:56:25 +0100

On 3.0.9


> ,optimize ((case-lambda (() 0)))
= 0

but 

> ,optimize ((case-lambda (() 0) ((a) 1)))
= ((case-lambda (() 0) ((a) 1)))


The problem with this is that when the output of a macro contains case-lambda, 
recursive application results in geometrical increase of code size. It seems 
that it should be possible to resolve the application on the spot; at last to 
reduce the case-lambda to a simple lambda when the arity is available (which 
now only happens when the case-lambda contains a single clause).

Thanks

  Daniel







reply via email to

[Prev in Thread] Current Thread [Next in Thread]