Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
94 views

I'm profiling scroll behavior in Chrome DevTools. I have a scroll handler that is throttled. Inside the handler I calculate the scroll progress of the page and toggle some UI elements such as a "...
wolf's user avatar
  • 1
Advice
2 votes
8 replies
200 views

Functional programming languages like Haskell or OCaml go though some effort to make curried functions have reasonable performance compared to uncurried functions. I am curious if V8 has any ...
Superstar64's user avatar
0 votes
1 answer
66 views

While solving a question in LeetCode (Longest common prefix), I used the startsWith and slice operation of JavaScript both of which are o(N) operations. But LeetCode claims the solution I submitted is ...
Adithya Vijay's user avatar
6 votes
1 answer
74 views

I'm working on a React table where each row has a dropdown with actions (Edit, Delete). I want to optimize performance using useMemo, but I'm stuck because each row needs a different path based on the ...
EmreLutfi's user avatar
1 vote
1 answer
131 views

I've been running some micro-benchmarks in Node.js v20.10 to understand how V8 handles object property removal. I noticed a massive performance discrepancy—a "performance cliff"—that seems ...
Alperen Çölgeçen's user avatar
Best practices
0 votes
3 replies
69 views

Does const obj = Object.create(null) create less overhead than just const obj = {} ? Maybe Object.create(null) even worse for performance? If i don't need to have properties like hasOwnProperty from ...
marigold's user avatar
Best practices
1 vote
4 replies
104 views

Whilst this question has been asked many times before there are seldom recommendation on it with modern browsers in 2025. Example: Total CSS for a website is 200kb. Total JS is 100kb. We know the ...
Walrus's user avatar
  • 20.6k
Best practices
1 vote
2 replies
75 views

In JavaScript, how costly is a function call? I ask because I'm looking at, at the start of a function, checking whether the results have already been calculated and, if so, just use them (assuming ...
Richard's user avatar
  • 5,119
0 votes
1 answer
204 views

In a high-performance Node.js service, I noticed that structuredClone() introduces unexpected latency spikes when cloning large nested objects (30–50 KB each). Even switching to manual cloning ...
Chand jr's user avatar
Advice
0 votes
2 replies
105 views

I was thinking back to WinJS or WinUI with Windows Universal Applications (WUA) from about 10 years ago. I am wondering how it compiled and avoided typical architecture errors. If there is no memory ...
LJones's user avatar
  • 61
-7 votes
1 answer
204 views

I have an object obj; and I then obtain an array arr of key-value pairs. Assuming that the key sets of obj and of arr are disjoint (i.e. no key appears in both) - how do I efficiently add all pairs in ...
einpoklum's user avatar
  • 139k
7 votes
1 answer
152 views

I compared the speed of normal JavaScript functions and prototype extensions. function NormalizeSpace(str) { return str.trim().replace(/\s+/g, " "); } String.prototype.NormalizeSpace = function () ...
Dr. Gut's user avatar
  • 3,537
0 votes
0 answers
54 views

I have a Pinia store defined like this: export type Era = { id: number name: string start_year: number end_year: number item_count: number } const settingStore = { eras: ref([] as Era[])...
Steve Bennett's user avatar
-2 votes
1 answer
134 views

I’m experimenting with sorting large arrays of unique integers in JavaScript and came up with a simple approach. I’m curious if it’s a recognized pattern or if there are potential pitfalls I might be ...
Aaron's user avatar
  • 1
0 votes
1 answer
140 views

Is there a way, in Chrome or Firefox, to accurately profile the execution time of a specific function (and the functions it calls). For context, I am writing a custom renderer for an app I am working ...
Mark Lisoway's user avatar

15 30 50 per page
1
2 3 4 5
564