Urgent.News

What's breaking now, across hundreds of outlets.

Tech

There's no reason for software to be slow anymore

There's no reason for software to be slow anymore, according to a new perspective that highlights the impact of artificial intelligence (AI) on code optimization. In the past, creating high-performance software required specialized skills and significant resources. However, the emergence of AI-powered tools such as language models (LLMs) and just-in-time (JIT) compilers has lowered the barrier to entry for writing optimized code.

The idea of rewriting software in super-optimized assembly code, as suggested in a viral tweet, is becoming more feasible. Marc Brooker pointed out that performance work, previously limited to rare skills, can now be accomplished by anyone. This shift has led to a growing trend of creating custom software tailored to specific workloads, rather than relying on generic solutions.

The discussion draws inspiration from the demoscene, where developers optimized code for specific tasks and hardware. Techniques like reusing code as textures were employed to improve cache locality. The meme circulating that "code was never the hard part" may be true in some domains, but for others, writing code was indeed the challenging part. This is particularly evident in the case of Just-In-Time (JIT) compilers, which historically were difficult to implement but are now more accessible due to AI advancements.

One example provided is the pgrust project, which aims to develop a JIT compiler. With the help of AI, optimistic results have been achieved, such as FRE, a regex engine, being heavily overfit to a specific benchmark suite. However, once a holdout benchmark was introduced, the AI model generalized the optimizations, resulting in satisfactory performance on unseen data.

Interestingly, the author of the piece tested FRE with a native AOT compiled version and observed improved performance for longer queries. This suggests that combining a native code compiler with an off-thread compilation process could potentially enhance performance, albeit at the cost of slower responses for shorter queries.

The author also proposes alternative approaches, such as creating text indexes similar to Bing's BitFunnel search index, which won the Best Paper Award at SIGIR. While off-the-shelf indexes may suffice for many use cases, the author expresses interest in exploring custom indexing solutions for more demanding scenarios, such as indexing an entire computer's disk for faster search capabilities.

Rewritten by urgent.news; may contain errors — check the original.

Source: danluu.com

Read the original at danluu.com →

Report a problem with this story

More in Tech

More from Tuesday 24 November →