summaryrefslogtreecommitdiff
path: root/devdocs/elisp/speed-of-byte_002dcode.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/elisp/speed-of-byte_002dcode.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/elisp/speed-of-byte_002dcode.html')
-rw-r--r--devdocs/elisp/speed-of-byte_002dcode.html25
1 files changed, 0 insertions, 25 deletions
diff --git a/devdocs/elisp/speed-of-byte_002dcode.html b/devdocs/elisp/speed-of-byte_002dcode.html
deleted file mode 100644
index dae47485..00000000
--- a/devdocs/elisp/speed-of-byte_002dcode.html
+++ /dev/null
@@ -1,25 +0,0 @@
- <h3 class="section">Performance of Byte-Compiled Code</h3> <p>A byte-compiled function is not as efficient as a primitive function written in C, but runs much faster than the version written in Lisp. Here is an example: </p> <div class="example"> <pre class="example">(defun silly-loop (n)
- "Return the time, in seconds, to run N iterations of a loop."
- (let ((t1 (float-time)))
- (while (&gt; (setq n (1- n)) 0))
- (- (float-time) t1)))
-⇒ silly-loop
-</pre>
-
-<pre class="example">(silly-loop 50000000)
-⇒ 10.235304117202759
-</pre>
-
-<pre class="example">(byte-compile 'silly-loop)
-⇒ <span class="roman">[Compiled code not shown]</span>
-</pre>
-
-<pre class="example">(silly-loop 50000000)
-⇒ 3.705854892730713
-</pre>
-</div> <p>In this example, the interpreted code required 10 seconds to run, whereas the byte-compiled code required less than 4 seconds. These results are representative, but actual results may vary. </p><div class="_attribution">
- <p class="_attribution-p">
- Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
- <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Speed-of-Byte_002dCode.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Speed-of-Byte_002dCode.html</a>
- </p>
-</div>