frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Optimizations That Aren't

https://zeux.io/2010/11/29/optimizations-that-arent/
19•daniel_alp•5d ago

Comments

taeric•1d ago
Point 4 really resonates with me. And it often lends itself with the idea of a budget. Both in terms of speed and memory. How much memory do you have at a given spot of the application? How much time? Can you meaningfully make use of any savings.

Sometimes, you will find slack in unexpected places, as well. Places that have extra time compared to what they used. Or, more common, things that could have used more memory. It is amazing what you can do with extra memory. (Indeed, I think the majority of algorithmic advances that people love to talk about come from using extra memory?)

pnt12•1d ago
I did some work in this area, concerning data pipelines, and it was a fun experience.

It's really satisfying to optimize (or any kind of refactor) on well tested code. Change the code, run the test, fix if it fails, keep it if it passes. Sometimes the code was not well tested, but it was slow, so there was double the reason to test and improve.

Having deterministic data for comparison is also good in a different perspective: slower feedback loop, but usually more variety, with edge cases you didn't think of. Transforming thousands of data points and getting 0 diffs compared to the original results is quite the sanity check!

Measuring can be difficult but really rewarding. I was doing this very technical work, but constantly writing reports on the outcomes (tables and later plots) and got great feedback from managers/clients, not only about the good results (when they happened, not always!) but also about the transparency and critical analysis.

We didn't really work with acceptance levels though. It was usually "this is slow now, and we expect more data later, so it must be faster". But it makes sense to define concrete acceptance criteria, it's just not always obvious. We'd go more in terms of priorities: explore the slow parts, come up with hypothesis, chase the most promising ones, depending on risk/reward. Easy fixes for quick wins, long stretches for potential big gains - but try to prototype first to validate before going on long efforts that may be fruitless.

kccqzy•1d ago
> Measure the performance of the target code in a specific situation

A difficult part of optimization is actually trying to make the code work well in multiple specific situations. This often happens in library code where different users call your code with very different sizes of inputs. Sometimes a dumb algorithm works better. Sometimes a fancier algorithm with better big-O but bigger constant factors works better. In practice people try to measure them according to the input size and dynamically choose the algorithm based on the size. This has the pitfall of the heuristic not keeping up with hardware. It also becomes intractable if the performance characteristics depend on multiple factors, then it's trying to encode the minimum in a multi-dimensional space. This work involved in optimization is just exhausting.

addaon•1d ago
The other approach here is to provide access to the multiple implementations, documentation as to the (main) sensitivities for their performance, and let the caller do their own benchmarking to select the right one, based on the specific situations they care about. It's a bit of kicking the can down the road, but it's also a bit of allowing your customers (at least the ones who care) to get the best results possible.

Scientists may have found a way to eliminate chromosome linked to Down syndrome

https://academic.oup.com/pnasnexus/article/4/2/pgaf022/8016019
143•MattSayar•3h ago•66 comments

Graphene OS: a security-enhanced Android build

https://lwn.net/SubscriberLink/1030004/898017c7953c0946/
68•madars•3h ago•9 comments

Inter-Planetary Network Special Interest Group

https://www.ipnsig.org
88•OhMeadhbh•4h ago•20 comments

Positron – A next-generation data science IDE

https://positron.posit.co/
90•amai•3d ago•42 comments

New Aarch64 Back End

https://ziglang.org/devlog/2025/#2025-07-23
52•Bogdanp•3h ago•4 comments

I wasted weeks hand optimizing assembly because I benchmarked on random data

https://www.vidarholen.net/contents/blog/?p=1160
209•thunderbong•3d ago•63 comments

A GPU Calculator That Helps Calculate What GPU to Use

https://calculator.inference.ai/
32•chlobunnee•2h ago•10 comments

AMD CEO sees chips from TSMC's US plant costing 5%-20% more

https://www.bloomberg.com/news/articles/2025-07-23/amd-ceo-su-sees-chips-from-us-tsmc-plant-costing-5-to-20-more
237•mfiguiere•1d ago•422 comments

There is no memory safety without thread safety

https://www.ralfj.de/blog/2025/07/24/memory-safety.html
248•tavianator•9h ago•226 comments

Visa and Mastercard: The global payment duopoly (2024)

https://quartr.com/insights/edge/visa-and-mastercard-the-global-payment-duopoly
196•bilekas•3h ago•85 comments

Revisiting Moneyball

https://djpardis.medium.com/revisiting-moneyball-074fc2435b07
47•sebg•3h ago•10 comments

Why concatenative programming matters (2012)

http://evincarofautumn.blogspot.com/2012/02/why-concatenative-programming-matters.html
43•azhenley•3d ago•7 comments

PSA: SQLite WAL checksums fail silently and may lose data

https://avi.im/blag/2025/sqlite-wal-checksum/
234•avinassh•10h ago•111 comments

Air Force unit suspends use of Sig Sauer pistol after shooting death of airman

https://www.nhpr.org/nh-news/2025-07-23/sig-sauer-pistol-air-force-shooting-death
85•duxup•6h ago•143 comments

Use Your Type System

https://www.dzombak.com/blog/2025/07/use-your-type-system/
220•ingve•10h ago•217 comments

RE#: High performance derivative-based regular expression matching (2024)

https://arxiv.org/abs/2407.20479
11•fanf2•3d ago•1 comments

Vet is a safety net for the curl | bash pattern

https://github.com/vet-run/vet
172•mooreds•12h ago•161 comments

Intel CEO Letter to Employees

https://morethanmoore.substack.com/p/intel-ceo-letter-to-employees
158•fancy_pantser•4h ago•280 comments

Open Source Maintenance Fee

https://github.com/wixtoolset/issues/issues/8974
208•AndrewDucker•12h ago•148 comments

Covers as a way of learning music and code

https://ntietz.com/blog/covers-as-a-way-of-learning/
120•zdw•3d ago•65 comments

Superfunctions: A universal solution against sync/async fragmentation in Python

https://github.com/pomponchik/transfunctions
22•pomponchik•3d ago•22 comments

American sentenced for helping North Koreans get jobs at U.S. firms

https://fortune.com/2025/07/24/north-korean-it-workers-chapman-nike/
89•fortran77•4h ago•62 comments

Bus Bunching

https://www.futilitycloset.com/2025/07/12/bus-bunching/
47•surprisetalk•4d ago•54 comments

UK: Phone networks down: EE, BT, Three, Vodafone, O2 not working in mass outage

https://www.the-independent.com/tech/ee-bt-three-vodafone-o2-down-phone-networks-outage-latest-b2795260.html
186•oger•11h ago•81 comments

Mwm – The smallest usable X11 window manager

https://github.com/lslvr/mwm
121•daureg•3d ago•49 comments

Writing is thinking

https://www.nature.com/articles/s44222-025-00323-4
257•__rito__•3d ago•109 comments

The POSIX specification of vi

https://pubs.opengroup.org/onlinepubs/9799919799/utilities/vi.html
58•exvi•3d ago•18 comments

Show HN: Easy Python Time Parsing

https://github.com/felixnext/python-time-helper
13•felixnext•3d ago•2 comments

Thunder Compute (YC S24) Is Hiring a C++ Systems Engineer

https://www.ycombinator.com/companies/thunder-compute/jobs/DhML6Uf-c-systems-engineer
1•cpeterson42•12h ago

Building MCP servers for ChatGPT and API integrations

https://platform.openai.com/docs/mcp
47•kevinslin•4h ago•18 comments