upvote
AI is like a genie: be careful what you wish for or you'll get what you asked for.

Lately at work I've done C++ optimization tricks like inplace_map, inplace_string, placement new to inline map-like iterators inside a view adapter's iterators and putting that byte buffer as the first member of the class to not incur std::max_align_t padding with the other members. At a higher architecture level, I wrote a data model binding library that can serialize JSON, YAML and CBOR documents to an output iterator one byte at a time without incurring heap allocation in most cases.

This is because I work on an embedded system with 640 KiB of SRAM and given the sheer amount of run-time data it will have to handle and produce, I'm wary not only about heap usage, but also heap fragmentation.

AI will readily identify such tricks, it can even help implement them, but unless constrained otherwise AI will pick the most expedient solution that answers the question (note that I didn't say answers the problem).

reply
This is also the reason why we have two polar opposite views on AI. “Slop generator” vs “Next best thing since sliced bread”.

With SOTA models it all depends on how you drive them.

reply
All my old software before AI was self documenting and didn't need comments -- it just was obvious. Today my prompts never make slop. I'm a really good driver.
reply
I think the opposite is the case. We increasingly need to care more about performance and know how to leverage hardware better.

The market is telling us that through increased hardware prices.

LLMs being very powerful means that we need to start being smarter about allocating resources. Should chat apps really eat up gigabytes of RAM and be entitled to cores, when we could use that for inference?

reply
People underestimate the effect of knowledge accumulation that happens when learning from high quality sources imo.

LLMs aren't even close to the level of knowledge distillation capacity a human has yet.

reply
Or..? A golden era for people who want to think of new things and test out their ideas quickly by having AI code it up.
reply