Drawing Text Isn't Simple: Benchmarking Console Vs. Graphical Rendering
Postedabout 2 months agoActiveabout 2 months ago
cv.co.huTechstory
calmmixed
Debate
60/100
Text RenderingPerformance OptimizationGraphics Rendering
Key topics
Text Rendering
Performance Optimization
Graphics Rendering
The article compares the performance of console and graphical rendering of text, sparking a discussion on text rendering techniques and optimization strategies.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
1h
Peak period
31
0-6h
Avg / period
6.8
Comment distribution41 data points
Loading chart...
Based on 41 loaded comments
Key moments
- 01Story posted
Nov 11, 2025 at 9:49 AM EST
about 2 months ago
Step 01 - 02First comment
Nov 11, 2025 at 11:05 AM EST
1h after posting
Step 02 - 03Peak activity
31 comments in 0-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 13, 2025 at 6:21 PM EST
about 2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45887857Type: storyLast synced: 11/20/2025, 5:39:21 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Author: frontend technical lead, setting high code standards
Sadly, this problem is common enough that click-before-keyboard-scrolling has become second nature for me.
Haha, to be fair it's common to half-ass personal projects even if it's your primary domain.
Edit: This is with Firefox 144 on Ubuntu 22.04
https://github.com/microsoft/terminal/issues/10362#issuecomm...
He used a cache. A simple hashtable. That's it. He got an absurd speedup of something like hundreds of times faster.
What are developers smoking these days that they can't even envision ever doing something like this without undertaking a research program?
To this day people will debate this, as if there's a valid debate to be had!
"No, no, no, it's premature to optimise software that is... being released to a billion users in production."
"Casey is adding unnecessary complexity that will be hard to maintain... by using a fraction of the code Microsoft did to solve the same problem."
"It must be full of errors... well... other than the superior Unicode compliance."
"It's so much longer to develop high-performance code... the evidence is that it took Casey two weekends to write a nearly complete terminal emulator!"
Etc...
Look where we are today. Microsoft still steadfastly refuses to even look at Casey's solution, let alone adopt it wholesale. Years later there are still blog articles being written about the performance issues of the Windows Terminal.
PS: Notepad and Calculator got the same "treatment" and now struggle to keep up with key presses.
A way faster terminal emulator demo: https://github.com/cmuratori/refterm
And a terminal rendering benchmark tool: https://github.com/cmuratori/termbench
Valve had this problem solved since 2007. I'd argue this technique is a big part of what gave TF2 its impressive visual style. That game ran at 100+ fps on hardware like the 8800GT at the time.
https://www.redblobgames.com/x/2403-distance-field-fonts/
In theory you could handle it however you want. You could make an SDF texture of a figure eight where the inside of the eight is purely zero and only the outside has a gradient. If you built a texture like this then your stroke with would only ever grow out of the shape.
This is an example of how SDF is very powerful.
If instead you're asking about the precision with regards to the infinitely small point of an intersection of two vectors it's actually not an issue at all. The technique uses the usual texture sampling pipeline such that the render will be as sharp as your SDF texture and as alias free as your mitmaping allows.
https://chlumsky.appspot.com/msdf-demo
The original Playstation could do 180 000 textured polygons per second[2], so it could've managed ~5 fps. Of course, you wouldn't render that many chars at its available output resolutions anyway. :)
[1] https://github.com/ctsilva/triangle-rendering-benchmarks#:~:... [2] https://en.wikipedia.org/wiki/PlayStation_technical_specific...
Runs at ~1500 FPS with a 6K screen of full text on my machine even when text is being updated at about the pace of a 150 WPM typist but you only update quads that strictly need to change and store font metrics on the GPU in a buffer. A full screen refresh where you send quad data for 750 Lorem ipsum paragraphs every frame runs at 300 FPS on my hardware.
That’s more like the most conventional way to draw characters ever. Nobody goes around rendering filled Béziers any more than absolutely necessary. And conventionally conventionally, fonts were bitmaps in the first place!
Bitmaps in ROM on early machines.
https://en.wikipedia.org/wiki/Motorola_6845
Makes me curious how much of computing is losing perceived speed because we have moved to calculating everything on the fly? Easy example is website layout. Yes, some dynamic sites need to calculate a ton on the fly. Most sites, though, probably don't need to reflow everything nearly as often as they do. And fitting everything into the mechanism that is the document flow remains baffling to me.
[1]: https://news.ycombinator.com/item?id=45580559
https://github.com/Chlumsky/msdfgen
and
https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007...
The context is GPU's, things like three.js
But yes, drawing text is hard.
https://faultlore.com/blah/text-hates-you/