GDL
About building parametric objects with GDL.

dim[10][10] or 100 parameters ?

gaba
Enthusiast

A quick technical question 😎
What is more efficient on the stack/memory side of GDL:
- a 10x10 array (i.e. 100 cells)
- or 100 parameters
?
I'm not asking about the convenience of use in a script.

"When you seek knowledge, you will eventually find it. Then you will become its source - until such time as you must seek it again."
AC 7 - 27 (28), Twinmotion | Windows 10 Pro for Workstations
Dell 7740 Xeon | 64GB | RTX 3000 6GB + LG 2560x1080
4 REPLIES 4
Barry Kelly
Moderator

I am sure that has  been asked here a long time ago, or maybe it was another forum.

If I find it i will let you know.

 

I don't have a technical answer for you, but I don't think you will notice much difference.

There is a physical limit to the number of parameters an object can have, I believe it is 1064?

Some of the doors and windows are approaching that limit from what I have read here before.

So if you can use an array then that is probably better in that it will free up possible parameters.

 

But speed/memory wise, I don't think you will notice a difference.

I guess the only way to find out for sure would be to try it.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

I did find this one post...

 

https://community.graphisoft.com/t5/Libraries-objects/Passing-parameters-to-macros-and-effectivity/m...

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Lingwisyer
Guru

Sounds like a question for @Peter Baksa .From the code execution side, I would have figured that an array would have been more efficient, on the scale of milliseconds, given the number of statements requiring processing, though I guess it depends on how you are querying, and how efficient the language is itself. It's no C++... 

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

On memory side an array takes less space, because each parameter has its own name and description, an array only one. Using different parameters, the script itself is longer too.

 

 

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest