Re: [nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-03 Thread Koray
This is very useful to know. Thank you for your help. On 3/3/18, Zlatko wrote: > > Hi Koray, > > Apparently, the answer to your original question is "yes", functions > generated by "eval" or "new Function()" will get optimized. I've asked one > of the V8 developers on

[nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-03 Thread Zlatko
Hi Koray, Apparently, the answer to your original question is "yes", functions generated by "eval" or "new Function()" will get optimized. I've asked one of the V8 developers on Twitter, he even referred on how Webpack (pretty popular and well known JavaScript package) achieves crazy

Re: [nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-02 Thread Parsa Ghadimi
Hi You can take a look at Node's VM module. (require use that module internally). On 2 March 2018 at 19:25, Koray wrote: > Hello, > > Thanks for your response. Main reason is I'm mostly a beginner so for > the time being this is the only way I know. There will be multiple

Re: [nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-02 Thread Koray
Hello, Thanks for your response. Main reason is I'm mostly a beginner so for the time being this is the only way I know. There will be multiple active sockets at any given time and they will be interacting, so I want to be able to roll changes in without having to restart. Koray On 3/2/18,

[nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-02 Thread Zlatko
Hi, Good question! V8 Googlers say nothing eval does is optimized and almost absolutely must be avoided (and they same for Function constructor IIRC) - but what about the product of it? I don't know, maybe you can run a few tests with v8-debug. I would be interested in results if you do run