Subject: Re: Fast string operations. Concatenate benchmarks on SBCL.
From: (Rob Warnock)
Date: Thu, 18 Jan 2007 04:04:31 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
<> wrote:
| kt is right, I've tried without apply, but keeping the &rest thing with
| ,@ and backquote:
| (defun string-append0 (&rest strings)
|    (declare (optimize (speed 3) (safety 0)))
|    `(concatenate  'string ,@strings))

Surely this is a typo, yes? As Ken pointed out, the result of
the above is a list, *not* a string. Perhaps you meant this?

    (defmacro string-append0 (&rest strings)
      `(concatenate  'string ,@strings))

I've been using something similar in my personal UTILS package:

    (defun strcat (&rest strings)
      (apply #'concatenate 'string strings))

    ;;; If arity known at compile time, semi-inline it.
    (define-compiler-macro strcat (&rest strings)
      `(concatenate 'string ,@strings))


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607