Fabio Spampinato
fabiospampinato.bsky.social
Fabio Spampinato
@fabiospampinato.bsky.social
Trying to write good software.
Zeptomatch v2.1.0 update 🥳:

- Partial matching, for traversing the filesystem easily _and_ efficiently.
- Roughly 2x faster single-glob matching, and 4x faster multi-glob matching (it's dependent on the specific globs though).
- Now roughly ~10x faster than minimatch.

github.com/fabiospampin...
October 20, 2025 at 11:01 AM
Somebody in Chrome should probably look into optimizing ::highlight() selectors because that stuff should go at the speed of light (we know all the matches from the start because the user told us), but it doesn't seem to be, at all.
March 17, 2025 at 7:19 PM
I don't get how capturing tracing information from a Chrome instance containing only one tab that is not even filling the screen with content and is using about 400 body elements could possibly take over a minute (I had to kill it).

Did Chrome hire people trying to make things slower or something?
March 17, 2025 at 6:44 PM
Reposted by Fabio Spampinato
Download images: 3831ms
Download webfonts: 1912ms
JS execution: 34ms
DOM reflows: 1109ms
Ad loading: 2019ms

Someone who can write a JS-to-native transpiler please help, my webpage performance is dying
March 17, 2025 at 3:58 PM
Very interesting how just changing an inline style on an element, which changes the "cursor" being rendered, triggers a style/layout/paint recalc for the entire page in Chrome 🙃

By far the biggest structural performance issue on the web is how rendering works, imo. What are we doing about that?
March 15, 2025 at 4:38 PM
Borderline criminal the size of an avocado seed.
March 14, 2025 at 10:48 PM
I wonder how much of a difference profit-wise would be for Tesco to use different baskets. The have ones that are very heavy (metal instead of plastic), oddly shaped (they could carry much more stuff without feeling bigger), and with unergonomic handles (thin metal ones that dig into your hands).
March 5, 2025 at 2:36 PM
Is there any on-demand CI where you send them the commands to execute and they just run them and give you stdout/stderr back?

I'd like to add support for executing my tests ~anywhere to my test runner, but I don't want a github-style CI thing, I just want an extra --flag and my existing workflows.
March 4, 2025 at 10:19 PM
I touched moss, does it count?
February 23, 2025 at 11:06 PM
Your outie hates each re-render equally
February 22, 2025 at 2:10 AM
Some incentives are interestingly different with signals: if you make a component a controlled component or not then updating it costs the same, but with a VDOM if the state lives in the parent now updating it is potentially much more expensive, so you are kinda incentivized to do the wrong thing 🤔
February 20, 2025 at 10:38 PM
New package, which is actually a benchmark: "json-simple-parser", the fastest pure-JS implementation I could come up with for a JSON parser.

Somewhat useful for benchmarking parser generators, or perhaps JS itself, or different engines, or if you like really ugly code?

github.com/fabiospampin...
GitHub - fabiospampinato/json-simple-parser: The fastest pure-JS implementation for JSON I could come up with.
The fastest pure-JS implementation for JSON I could come up with. - fabiospampinato/json-simple-parser
github.com
February 18, 2025 at 2:39 AM
I just asked chatGPT to clean up a truly awful JSON parser, and surprisingly the code it gave me still works. It converted it to (nicer?) OOP garbage and it's some 70% slower though. But then I asked it to not make it slower, and it still gave me OOP garbage that's only ~13% slower. Pretty cool.
February 17, 2025 at 10:34 PM
Arrow functions seem special in that you can often easily detect when they don't use any of their arguments for sure, like this:

```ts
let {toString} = Function.prototype;
let isNullaryFunction = typeof fn === 'function' && fn.length === 0 && toString. call(fn).startsWith('() =>');
```
February 17, 2025 at 4:09 PM
Does anybody know what the fastest JSON parser written in JS is? I'd like to check how mine compares against it. github.com/fabiospampin... 👈
February 17, 2025 at 2:16 AM