Costinbos77 Posted March 24, 2013 Posted March 24, 2013 (edited) Hi there, Which of the following expressions are executed faster in repeated use (while, repeat, foreach): (setq li0 '(0 . "TEXT") li40 (cons 40 1)) 1. (entmake (list li0 ... li40) ) 2. (entmake (list '(0 . "TEXT") ...'(40 . 1)) ) 3. (entmake (list (cons 0 "TEXT") ... (cons 40 1)) ) Because I want to replace part of the list with variables. Edited March 24, 2013 by Costinbos77 Quote
Lee Mac Posted March 24, 2013 Posted March 24, 2013 4. (entmake '((0 . "TEXT") ... (40 . 1.0))) Quote
Costinbos77 Posted March 25, 2013 Author Posted March 25, 2013 Okay, but some properties are variable and then I can not use this variant. (entmake (list '(0 . "TEXT") (cons 1 txt) ... (cons 40 h) (cons 50 a) ) ) Quote
Lee Mac Posted March 25, 2013 Posted March 25, 2013 Quote static data where possible to ensure fewer expressions are evaluated to construct the DXF data list. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.