frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

A 40-line fix eliminated a 400x performance gap

https://questdb.com/blog/jvm-current-thread-user-time/
72•bluestreak•1h ago

Comments

jerrinot•1h ago
Author here. After my last post about kernel bugs, I spent some time looking at how the JVM reports its own thread activity. It turns out that "What is the CPU time of this thread?" is/was a much more expensive question than it should be.
Neywiny•1h ago
Did you look into the large spread on your distributions? Some of these span multiple orders of magnitude which is interesting
jerrinot•59m ago
Fair point. These were run on a standard dev workstation under load, which may account for the noise. I haven't done a deep dive into the outliers yet, but the distribution definitely warrants a more isolated look.
jacquesm•42m ago
I don't think it is possible to talk about fractions of nanoseconds without having an extremely good idea of the stability and accuracy of your clock. At best I think you could claim there is some kind of reduction but it is super hard to make such claims in the absolute without doing a massive amount of prep work to ensure that the measured times themselves are indeed accurate. You could be off by a large fraction and never know the difference. So unless there is a hidden atomic clock involved somewhere in these measurements I think they should be qualified somehow.
rcxdude•36m ago
Stability and accuracy, when applied to clocks, are generally about dynamic range, i.e. how good is the scale with which you are measuring time. So if you're talking about nanoseconds across a long time period, seconds or longer, then yeah, you probably should care about your clock. But when you're measuring nanoseconds out of a millisecond or microsecond, it really doesn't matter that much and you're going to be OK with the average crystal oscillator in a PC. (and if you're measuring a 10% difference like in the article, you're going to be fine with a mechanical clock as your reference if you can do the operation a billion times in a row).
jacquesm•17m ago
This setup is a user space program on a machine that is not exclusively dedicated to the test running all kinds of interrupts (and other tasks) left, right and center through the software under test.
6r17•31m ago
Very thankful for the 1liner tldr

edit : I had an afterthought about this because it ended up being a low quality comment ;

Bringing up such TLDR give a lot of value to reading content, especially on HN, as it provides way more inertia and let focus on -

reading this short form felt like that cool friend who gave you a heads up.

jerrinot•26m ago
I was unsure whether to post it or not so I am glad you found it useful!
6r17•23m ago
I have that 10-30s time window to fill when claude might be loading some stuff ; the 1 liner is exactly what fits in that window - it makes me wonder about the original idea of twitter now that I think of it - but since it's not the same kind of content I don't bother with it.It really feels like "here is the stuff, here's more about it if you want to" - really really appreciate that form and will definitely do the same format myself
ee99ee•45m ago
This is such a great writeup
higherhalf•11m ago
clock_gettime() goes through vDSO, avoiding a context switch. It shows up on the flamegraph as well.
a-dub•5m ago
edit: agh, no. CLOCK_THREAD_CPUTIME_ID falls through the vdso to the kernel.
jerrinot•5m ago
Only for some clocks (CLOCK_MONOTONIC, etc) and some clock sources. For VIRT/SCHED, the vDSO shim still has to invoke the actual syscall. You can't avoid the kernel transition when you need per-thread accounting.
ot•4m ago
If you look below the vDSO frame, there is still a syscall. I think that the vDSO implementation is missing a fast path for this particular clock id (it could be implemented though).
jerrinot•3m ago
Exactly this.

EOL hardware should mean open-source software

https://www.marcia.no/words/eol
87•Marciplan•2h ago•12 comments

A 40-line fix eliminated a 400x performance gap

https://questdb.com/blog/jvm-current-thread-user-time/
74•bluestreak•1h ago•15 comments

Every GitHub object has two IDs

https://www.greptile.com/blog/github-ids
47•dakshgupta•9h ago•0 comments

The $LANG Programming Language

25•dang•35m ago•4 comments

Are two heads better than one?

https://eieio.games/blog/two-heads-arent-better-than-one/
98•evakhoury•8h ago•23 comments

The Tulip Creative Computer

https://github.com/shorepine/tulipcc
181•apitman•7h ago•38 comments

We can't have nice things because of AI scrapers

https://blog.metabrainz.org/2025/12/11/we-cant-have-nice-things-because-of-ai-scrapers/
228•LorenDB•2h ago•138 comments

Japan's Skyscraper Factories (2021)

https://www.construction-physics.com/p/japans-skyscraper-factories
26•Pikamander2•6d ago•1 comments

Show HN: Nogic – VS Code extension that visualizes your codebase as a graph

https://marketplace.visualstudio.com/items?itemName=Nogic.nogic
58•davelradindra•6h ago•23 comments

The insecure evangelism of LLM maximalists

https://lewiscampbell.tech/blog/260114.html
146•todsacerdoti•1h ago•139 comments

How to make a damn website (2024)

https://lmnt.me/blog/how-to-make-a-damn-website.html
128•birdculture•7h ago•43 comments

Scott Adams has died

https://www.youtube.com/watch?v=Rs_JrOIo3SE
717•ekianjo•9h ago•1177 comments

Running Lean at Scale

https://harmonic.fun/news#blog-post-lean
51•eab-•3h ago•3 comments

Terra - A rolling-release Fedora repository

https://terra.fyralabs.com/
10•doodlesdev•2h ago•1 comments

Understanding the Types of Data in Data

https://ischool.syracuse.edu/types-of-data/
5•mahirsaid•3d ago•0 comments

Why we don’t use AI

https://yarnspinner.dev/blog/why-we-dont-use-ai/
71•parisidau•2h ago•36 comments

AI Generated Music Barred from Bandcamp

https://old.reddit.com/r/BandCamp/comments/1qbw8ba/ai_generated_music_on_bandcamp/
535•cdrnsf•6h ago•422 comments

SkyPilot: One system to use and manage all AI compute (K8s, 20 clouds, Slurm)

https://github.com/skypilot-org/skypilot
3•covi•5h ago•0 comments

Why Real Life is better than IRC (2000)

https://everything2.com/node/e2node/Why%20Real%20Life%20is%20better%20than%20IRC
49•themaxdavitt•4d ago•38 comments

Ask HN: Quantum Computation, Computers and Programming

13•rramadass•13h ago•10 comments

Show HN: AsciiSketch a free browser-based ASCII art and diagram editor

https://files.littlebird.com.au/ascii-sketch.html
9•schappim•2h ago•4 comments

Legion Health (YC S21) Hiring Cracked Founding Eng for AI-Native Ops

https://jobs.ashbyhq.com/legionhealth/ffdd2b52-eb21-489e-b124-3c0804231424
1•ympatel•7h ago

Influencers and OnlyFans models are dominating U.S. O-1 visa requests

https://www.theguardian.com/us-news/2026/jan/11/onlyfans-influencers-us-o-1-visa
335•bookofjoe•8h ago•241 comments

Inlining – The Ultimate Optimisation

https://xania.org/202512/17-inlining-the-ultimate-optimisation
41•PaulHoule•4d ago•15 comments

Is it a joke?

https://novalis.org/blog/2025-11-06-is-it-a-joke.html
11•luu•2h ago•2 comments

Choosing learning over autopilot

https://anniecherkaev.com/choosing-learning-over-autopilot
43•evakhoury•6h ago•31 comments

Open sourcing Dicer: Databricks's auto-sharder

https://www.databricks.com/blog/open-sourcing-dicer-databricks-auto-sharder
63•vivek-jain•4h ago•9 comments

Going for Gold: The Story of the Golden Lego RCX and NXT

https://bricknerd.com/home/going-for-gold-the-story-of-the-golden-lego-rcx-and-nxt-9-9-21
37•kotaKat•4d ago•7 comments

Superhuman AI Exfiltrates Emails

https://www.promptarmor.com/resources/superhuman-ai-exfiltrates-emails
90•takira•1d ago•24 comments

Show HN: Ayder – HTTP-native durable event log written in C (curl as client)

https://github.com/A1darbek/ayder
49•Aydarbek•6h ago•22 comments