Jump to content

Recommended Posts

Posted (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 by Costinbos77
Posted

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) ) )

Posted

Quote static data where possible to ensure fewer expressions are evaluated to construct the DXF data list.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...