[Top][All Lists]

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

Re: make a drawing with Emacs

From: Lars Magne Ingebrigtsen
Subject: Re: make a drawing with Emacs
Date: Thu, 03 Sep 2020 19:45:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <> writes:

> IIRC it would make the code slower, tho.  It adds code like
>     (let ((stroke-color (cadr (plist-member args :stroke-color))))
> which the compiler fails to optimize away when `stroke-color` is not used.

I didn't know that...  but on the other hand, all these functions end up
calling this internal function:

(defun svg--arguments (svg args)
  (let ((stroke-width (or (plist-get args :stroke-width)
                          (dom-attr svg 'stroke-width)))
        (stroke-color (or (plist-get args :stroke-color)
                          (dom-attr svg 'stroke-color)))
        (fill-color (plist-get args :fill-color))

Which could then lose these plist-gets, so we'd end up with
approximately the same slowness, I think.  :-)

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog:

reply via email to

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