Why is JavaScript considered slower compared to Rust? 👉 What actually happens between writing JS and the CPU executing it? That’s when I discovered… it’s all about layers and runtime behavior. 🟡 JavaScript: More Layers Between You and the CPU JavaScript runs inside engines like V8. The flow looks like this: JS Code → Parsing → AST → Bytecode → Interpreter → JIT Compiler → Machine Code → CPU That’s a lot of layers. Each layer adds: Dynamic type checks Garbage collection Runtime optimizations De-optimization when assumptions break JavaScript compiles while running. It’s flexible. But flexibility adds overhead. #JavaScript #Rust #Programming #SoftwareEngineering #WebDevelopment
JavaScript Performance: Layers Between Code and CPU
More Relevant Posts
-
Day 2- of Leetcode 30 days of javascript. Problem 2620 The problem statement was to return a function inside a parent function, and when the parent function is called, it should return in subsequent ascending +1 result. i,e n, n+1, n+2 for any value of n. This problem was based on closures and lexical scope of higher ordered function. There are many approach for this problem but I tried by setting a counter n - 1 and then incrementing it by 1, ie counter += 1. I am open to advice and please comment on how can I improve. #Leetcode #coding #javascript #Logic #growth #programming #higherorderfunction #closures #lexicalscope #scope
To view or add a comment, sign in
-
-
📚 New article just published on SYUTHD! 🔖 Mastering Local-First Frameworks: The 2026 Guide to Building With PGLite and CRDTs 🏷️ Category: JavaScript Frameworks 📖 Full article → https://lnkd.in/gMuajsA2 👉 Follow our page for more tech tutorials: https://lnkd.in/gsJDptPM 💬 Telegram: https://t.me/nisethtechno 👍 Facebook: https://lnkd.in/gsKv3Dyn #JavaScriptFrameworks #Tech #Tutorial #Programming #TechBlog #2026
To view or add a comment, sign in
-
At first, it looks simple: ********************** console.log("Hello World"); ********************** But internally, the journey is much more interesting. Here’s the high-level flow: 1. TC39 defines the JavaScript standard. This is where the language specification evolves. 2. A JavaScript engine like V8 parses the code. The engine reads and understands the JavaScript syntax. 3. V8 interprets and JIT-compiles the code. Frequently used code gets optimised into machine code. 4. The CPU executes that machine code. This is where the actual execution happens. Parallely, libuv supports async operations like event loop, timers, file system, and network I/O. We write a few simple lines of JavaScript, but behind the scenes, there are standards, engines, compilers, and runtime components working together to make it all happen. The deeper I go into internals, the more I appreciate the abstractions we use every day. Thanks to Node.js. #JavaScript #NodeJS #V8 #SoftwareEngineering #Programming #BackendDevelopment #ComputerScience
To view or add a comment, sign in
-
-
The "this" Keyword: Predictable or a Trap? 🧐 Most devs think they understand this, until it returns undefined. Can you guess the output of this simple object? const obj = { a: 10, f: function () { return this.a; }, }; console.log(obj.f()); The answer seems easy... but do you know what happens to this if we change that function to an Arrow Function? 🤯 In my latest video, I break down exactly how execution context works so you never have to guess again. #JavaScript #WebDev #CodingTips #SoftwareEngineering #Programming
To view or add a comment, sign in
-
⚡ 42 seconds → 1 second. This is what happens when Rust enters your JavaScript build pipeline. We migrated our FE linting pipeline from ESLint + 9 plugins to oxlint. Here's what we measured: ESLint v9 + 9 plugins = 42s oxlint 162 rules = 1s Over 6k files, tested on Apple M5 Pro. 42× speedup on a single run, the delta compounds in CI and watch mode. Migration path was straightforward: most ESLint rules had direct equivalents. A few gaps required minor workarounds, nothing blocking. If your lint step is a bottleneck in local DX or CI pipelines, this is worth evaluating seriously. https://lnkd.in/eNQkNqu4 #JavaScript #DeveloperExperience #Rust #oxlint #CI
To view or add a comment, sign in
-
I’ve been writing JavaScript/TypeScript for about 2 years now. Like many, I got used to the convenience of the V8 engine—no manual compilation, easy async/await, and not worrying too much about memory management. Recently, I started porting some backend logic to Go, and the performance difference is staggering. In a recent test on my machine 📉 Node.js: Consumed 5-8% CPU for a few concurrent tasks. 📈 Go: Consumed <1% CPU handling 10+ concurrent Goroutines. Why? Compilation: Go compiles directly to machine code, skipping the heavy runtime overhead. Concurrency: Go’s scheduler and Goroutines are vastly more efficient than spawning heavy Node.js processes or relying solely on the Event Loop for CPU-bound tasks. It’s been a humbling experience realizing how much resources we often waste because "hardware is cheap." Learning Go has forced me to care about runtime efficiency, memory allocation, and true multithreading. Has anyone else experienced this drastic performance gap when switching stacks? #Go #NodeJS #Coding #DevCommunity #SystemDesign #Efficiency
To view or add a comment, sign in
-
-
Day 3 of 30 days of javascript, Leetcode problem - 2704 The problem statement asked to create a function "expect" that needs to return an object with two functions "toBe" and "notToBe" where in the value assigned to "toBe" , if is same as the parent function, it should return true, else it should throw an error, "Not Equal" and... where in the value assigned to "notToBe", if is not same as the parent function should return true, or else it should throw an error "Equal". This problem taught me the understanding of nesting objects in function body, I deep dived into closures and how a object can access the parent through lexical scope. #coding #logic #leetcode #programming #lexicalscope #MERN #web #webdevelopment #goals
To view or add a comment, sign in
-
-
Mastering Memory Management in JavaScript: A Practical Guide JavaScript abstracts away low‑level memory handling, but developers still need to understand how the engine allocates, retains, and releases memory to write performant, leak‑free applications. This guide covers the memory model, common leak patterns, detection techniques, and best‑practice solutions with real‑world code examples. Read the full article 👇 https://lnkd.in/gvd2MRAK #Technology #Programming #WebDevelopment #SoftwareEngineering #Coding #JavaScriptMemory #MemoryManagement #JSPerformance #MemoryLeaks #FrontendOptimization #FutureOfWork #DigitalTransformation
To view or add a comment, sign in
-
-
VoidZero just replaced your entire frontend toolchain with one command. vp dev → Vite dev server vp check → lint + format + typecheck (50-100x faster than ESLint) vp test → Vitest vp build → Rolldown (7x faster than Vite 7) One binary. One config file. MIT licensed. The JavaScript tooling tax is over. Check: https://lnkd.in/g9GbvhjZ Tags: #Frontend #Programming #Tooling
To view or add a comment, sign in
-
-
🧠 Day 178 — Next Greater Element 📈 Today I revised one of the most important stack pattern problems in DSA: Next Greater Element. The goal is straightforward but very useful: ✔ For every element, find the next greater element on its right ✔ If no greater element exists → return -1 This problem is a great example of combining: • Stacks • Efficient traversal techniques • Hash map lookups for fast queries Understanding this pattern unlocks solutions to many other problems like Daily Temperatures, Stock Span, and Largest Rectangle in Histogram. 🚀 DSA Journey Update Slowly building strong foundations in Stacks, Dynamic Programming, and Trees. Consistency is the real game. #DSA #Stacks #MonotonicStack #JavaScript #CodingJourney #LeetCode #ProblemSolving #ConsistencyWins
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development