Load vs Require

H

Hugo

Hello all!
Is there any difference between using Load and Require?
These two methods have the same performance?

Thank you for your answers.

Best regards,
Hugo
 
E

Eero Saynatkari

Hello all!
Is there any difference between using Load and Require?
These two methods have the same performance?

#load always loads and interprets the file in question,
whereas #require will only do it the first time around
(filenames required earlier in $" or $LOADED_FEATURES).
This is very useful if you have a file that might change
while the program is running.

Here the two methods have distinctly different effects,
so efficiency should not really be a factor--just use
#load only when above behaviour is desired.

(And, in general, worry about performance only after
you have profiled your program and identified the
bottlenecks :)
Thank you for your answers.

Best regards,
Hugo


E
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,662
Latest member
sxarexu

Latest Threads

Top