Subject: Quick question

From: Gilmore <[email-masked]>
Date: Tue, 20 Oct 1992 08:38:25 -0700

Just out of curiosity ...

Which is more efficient?

(1)  list = {@list, item};
(2)  list = listappend(list, item);

By efficient, I mean from a standpoint of actual CPU time to perform the
operation.

                    - Gilmore

---

From: Judy Anderson <[email-masked]>
Date: Tue, 20 Oct 1992 08:56:00 -0700

Date: Tue, 20 Oct 1992 11:38 EDT
    From:	Gilmore <[email-masked]>

    Which is more efficient?

			- Gilmore

These are equivalent.

---

From: Pavel Curtis <[email-masked]>
Date: Tue, 20 Oct 1992 11:04:50 -0700

> Date:	Tue, 20 Oct 1992 08:38:25 -0700

In terms of either ticks or real CPU time, the first one is a *little* bit
cheaper.  The major difference is that the second one must first construct the
list {list, item} in order to call the built-in function, while the first one
only does the actual result-list computation.

That the first one is also easier to understand and is thus more likely to
attract my optimization attention in the future is, of course, gravy.

	Pavel