Subject: Re: Proposal: eliminate all macros in the kernel
To: None <>
From: Jed Davis <>
List: tech-kern
Date: 11/21/2005 20:30:08
Thor Lancelot Simon <> writes:

> On Sun, Nov 20, 2005 at 08:01:26PM +0000, David Laight wrote:
>> Inlining code can have a large negative performance due to the way
>> that it interacts rather badly with the instruction cache.
> I think we're very much in agreement about this.  Just to be clear, I am
> suggesting that we *first* move from macros to inline functions -- a
> change that is primarily syntactic, which should have little or no impact
> on performance but improve readability and maintainability of code, *then*
> carefully consider which of those functions should be inline at all: any
> resulting changes at that point should be much simpler to make because
> the macros will have already been converted to function form.

It Would Be Nice If the compiler could attempt to decide on its own
whether a particular function should be inlined, since it's likely to
know more about the situation on a given architecture than we do.

(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))