You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how important or necessary this is, but there is a fairly large performance hit for destructuring optional arguments in functions.
For example:
(defnchanges"Return an infinite stream of objects representing changes to a query."
[xs & [optargs]]
(term:CHANGES [xs]))
takes roughly 200 ns to run when passed an optarg, whereas
(defnchanges"Return an infinite stream of objects representing changes to a query."
([xs]
(term:CHANGES [xs] nil))
([xs optargs]
(term:CHANGES [xs] optargs)))
takes ~25 ns. While the speedup is large in relative terms, it's still fairly small in absolute terms.
The text was updated successfully, but these errors were encountered:
I'm not sure how important or necessary this is, but there is a fairly large performance hit for destructuring optional arguments in functions.
For example:
takes roughly 200 ns to run when passed an optarg, whereas
takes ~25 ns. While the speedup is large in relative terms, it's still fairly small in absolute terms.
The text was updated successfully, but these errors were encountered: