js-interpreter | 一个简陋的 JavaScript 解释器实现。A simple JavaScript interpreter | Interpreter library
kandi X-RAY | js-interpreter Summary
kandi X-RAY | js-interpreter Summary
一个简陋的 JavaScript 解释器实现。A simple JavaScript interpreter, build for beginners.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of js-interpreter
js-interpreter Key Features
js-interpreter Examples and Code Snippets
Community Discussions
Trending Discussions on js-interpreter
QUESTION
I am profiling a heavily modified fork of JS Interpreter, running on node.js v12.12.0, using --prof
, while it runs a short synthetic benchmark. In the output from `node --prof-process, I see that 63% of the program's runtime is spent in C++:
ANSWER
Answered 2020-Feb-25 at 14:53Finding DispatcherImpl
isn't hard: https://github.com/nodejs/node/search?q=dispatcherimpl&unscoped_q=dispatcherimpl leads straight to https://github.com/nodejs/node/blob/5aaa7fee2e4a075d9123b885f9e8cda3de2a780a/tools/inspector_protocol/templates/TypeBuilder_cpp.template#L218. But that probably isn't what you're really looking for...
There was a bug in the --prof
system for a while where C++ ticks would get attributed to the wrong function -- looks like you might be running into that. It's been fixed in V8 recently, but the fix hasn't rolled into a Node release yet.
As a workaround, on Linux, you can use perf
to profile C++ code [1], while still using --prof
for JavaScript; JavaScript ticks as well as the C++/JavaScript distribution should be reliably correct in --prof
's output. On other platforms there should be equivalent generic profiling techniques.
[1] For details, read the man page. I typically use something like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install js-interpreter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page