Using the most unhinged AVX-512 instruction to make the fastest phrase search algo
Disclaimers before we start For those who don’t want to read/don’t care that much, here are the results. I hope after seeing them you are compelled to read. TL;DR: I wrote a super fast phrase search algorithm using AVX-512 and achieved wins up to 1600x the performance of Meilisearch. The source ...
Hasnain says:
Learned so much about so many things from this one. Gotta love when you see something like this a few thousand words into a post you already thought was quite interesting
“Now that the boring stuff is behind us, let’s start the fun part. Again, just as a reminder on how the intersection works: we do two phases of intersection, one for the conventional intersection and another for the bits that would cross the group boundary, and in the end, we merge these two.
In this section, we will take a look at assembly, some cool tools to analyze this assembly, AVX-512, differences in the microarchitecture of AMD and Intel chips, emulation of instructions, and a lot more. So again, sorry to bother you with all of the previous stuff, but it was important.”
Posted on 2025-01-27T08:25:55+0000
Using Protobuf to make Jira Cloud faster - Work Life by Atlassian
Atlassian’s mission is to help unleash the potential of every team, and a critical part of that is to create...
Hasnain says:
“Moving data serialization format used by the Issue Service to Protobuf resulted in many improvements, including faster response time and reduced resource consumption (CPU, storage). Even though there were some challenges we had to solve during the migration, the final results were absolutely worth the effort. As we continue our work in the Issue Service and progress to handling more traffic and data, the impact of these relative improvements will continue to grow.”
Posted on 2025-01-27T02:11:34+0000
Pluralistic: It’s not a crime if we do it with an app (25 Jan 2025) – Pluralistic: Daily links from Cory Doctorow
No trackers, no ads. Black type, white background. Privacy policy: we don't collect or retain any data at all ever period.
Hasnain says:
“Inflation has lots of causes, it's true. But when an industry is consolidated enough to take advantage of a data brokerage or just engage in tacit collusion, any source of inflation – war, disease, weather – allows whole sectors to raise prices together, and keep them high, long after the shock has passed.”
Posted on 2025-01-26T16:41:54+0000
The Canva outage: another tale of saturation and resilience
Today’s public incident writeup comes courtesy of Brendan Humphries, the CTO of Canva. Like so many other incidents that came before, this is another tale of saturation, where the failure mod…
Hasnain says:
“We need to build in the ability to reconfigure our systems in advance, without knowing exactly what sorts of changes we’ll need to make. The Canva engineers had some powerful operational knobs at their disposal through the Cloudflare firewall configuration. This allowed them to make changes. The more powerful and generic these sorts of dynamic configuration features are, the more room for maneuver we have. Of course, dynamic configuration is also dangerous, and is itself a contributor to incidents. Too often we focus solely on the dangers of such functionality in creating incidents, without seeing its ability to help us reconfigure the system to mitigate incidents.
Finally, these sorts of operator interfaces are of no use if the responders aren’t familiar with them. Ultimately, the more your responders know about the system, the better position they’ll be in to implement these adaptations. Changing an unhealthy system is dangerous: no matter how bad things are, you can always accidentally make things worse. The more knowledge about the system you can bring to bear during an incident, the better position you’ll be in to adaptive your system to extend that competence envelope.”
Posted on 2025-01-26T03:43:36+0000
How Unix Spell Ran in 64kB RAM
How do you fit a dictionary in 64kb RAM? Unix engineers solved it with clever data structures and compression tricks. Here's the fascinating story behind it.
Hasnain says:
This was a fun read, reminding me I need to go back and keep up with the latest in succinct data structure research.
Also kinda timely quote given the recent hoopla around DeepSeek:
“Even though modern spell checkers use different techniques like edit distance and language models, the engineering insights from Unix spell remain valuable. It shows how deep understanding of theoretical concepts combined with practical constraints can lead to efficient and elegant solutions.
Most importantly, it demonstrates that some of the best innovations happen when we are resource constrained, forcing us to think deeper about our problems rather than throwing more hardware at them.”
Posted on 2025-01-26T02:44:56+0000
The Jagged, Monstrous Function That Broke Calculus | Quanta Magazine
In the late 19th century, Karl Weierstrass invented a fractal-like function that was decried as nothing less than a “deplorable evil.” In time, it would transform the foundations of mathematics.
Hasnain says:
“In 1872, Weierstrass published a function that threatened everything mathematicians thought they understood about calculus. He was met with indifference, anger and fear, particularly from the mathematical giants of the French school of thought. Henri Poincaré condemned Weierstrass’ function as “an outrage against common sense.” Charles Hermite called it a “deplorable evil.””
Posted on 2025-01-25T22:17:26+0000
C stdlib isn’t threadsafe and even safe Rust didn’t save us | EdgeDB Blog
Threads, TLS, a C stdlib race, and Rust: how EdgeDB hit a hidden landmine.
Hasnain says:
“The Real Culprit: setenv and getenv
setenv is not a safe function to call in a multithreaded environment. This is often a problem, and occasionally rediscovered as developers like us hit weird crashes in libc’s getenv [9], [10], [11], [12].”
Posted on 2025-01-25T21:10:27+0000
Life Lessons from the First Half-Century of My Career – Communications of the ACM
Membership in ACM includes a subscription to Communications of the ACM (CACM), the computing industry's most trusted source for staying connected to the world of advanced computing.
Hasnain says:
This was chock full of great advice.
“Choose happiness. If you’re unhappy in life, success is much harder to achieve. When I was growing up, the American mantra was that happiness requires wealth. Wealth and happiness are two different goals; we have unhappy billionaires today! I always picked happiness over wealth when there was a choice, and I’m very glad that I did.”
Posted on 2025-01-25T20:16:27+0000
Did a Private Equity Fire Truck Roll-Up Worsen the L.A. Fires?
During the LA fires, dozens of fire trucks sat in the boneyard, waiting for repairs the city couldn't afford. Why? A private equity roll-up made replacing and repairing those trucks much pricier.
Hasnain says:
TIL over half of LA’s fire trucks were out of commission during the recent fires and a nontrivial amount of the blame here goes to… private equity
“While AIP’s consolidation of economic power over fire truck manufacturing is appalling, it is not some unsolvable, intractable problem we just have to live with. State and federal antitrust laws already prohibit the kind of monopolistic roll-up that AIP perpetrated — they just need to be enforced. State AGs can bring lawsuits to force REV Group to divest the manufacturers it illegally acquired and to pay damages to fire departments for the harm that its (attempted) monopolization of the fire-truck industry has caused. Fire departments and other fire-apparatus purchasers can bring their own lawsuits to do the same. So can the FTC and the DOJ’s Antitrust Division. If state legislators or members of Congress want to pave the way for such lawsuits, they can launch their own investigations into the fire apparatus industry. And if anyone wants guidance on what a lawsuit against AIP could look like, Lina Khan left us a roadmap just before she stepped down from the FTC last week — when she sued private-equity giant Welsh Carson for rolling up Texas anesthesiology practices to drive up the price of anesthesia services to Texas patients.
We have all the tools we need to check AIP’s greed and abuse and restructure the fire-truck industry so it serves the public interest. The only question is whether our political leaders have the will.”
Posted on 2025-01-25T20:08:09+0000
Mostly civilians were killed in IDF attack on Lebanon village, BBC finds
The missile strike on a Lebanese apartment block targeting Hezbollah left mostly civilians dead, BBC finds.
Hasnain says:
“The Israel Defense Forces (IDF) says the building was targeted because it was a Hezbollah "terrorist command centre" and it "eliminated" a Hezbollah commander. It added that "the overwhelming majority" of those killed in the strike were "confirmed to be terror operatives".
But a BBC Eye investigation verified the identity of 68 of the 73 people killed in the attack and uncovered evidence suggesting just six were linked to Hezbollah's military wing. None of those we identified appeared to hold a senior rank. The BBC's World Service also found that the other 62 were civilians - 23 of them children.”