RE: https://labyrinth.social/@nash/116178591588359360

you ever write code so inefficient you have to secure 80% of the worldโ€™s DRAM production

@colinstu Wot happens if you tell an AI "see this code base? - make it do the same thing but a few orders of magnitude faster and cheaper".
@TimWardCam @colinstu
I think you will find a lot of assumptions are unfounded

@RnDanger
Which assumptions are unfounded?

@TimWardCam @colinstu

@dougmerritt @TimWardCam @colinstu
"
Wot happens if you tell an AI "see this code base? - make it do the same thing but a few orders of magnitude faster and cheaper".
"

So you assume, first of all, that there could be a way to do it ten times faster. Granted this could be true but your expectations are seriously wild. If you were in charge of a project i was working on and you said this i would immediately understand that I'll be trying to pit reality against one person's fantasy until this project gets canned for being a money waster.

Next you assume that the AI understands what the code does. AI is really pattern recognition and your code is full of patterns. What is not good at is architecture, it cannot assemble ideas into interoperable structures. If you tell it to prioritize speed it will probably fake a result to get you to agree it did the impossible thing. People keep trying to train AI to find obscure things in images and what they end up with is a training set that differentiates photos based on what camera was used instead of who had cancer. The result is fast! It's perfect reliability in the training set! And it doesn't help anyone

@RnDanger @dougmerritt @colinstu "So you assume, first of all, that there could be a way to do it ten times faster."

Not necessarily. If someone said that to me (or presumably to you) the response would be an explanation as to why the code was probably already about as efficient as it needed to be.

(Having said which, I did once get asked to speed up someone else's code, because the daily database update was creeping towards taking twenty-four hours. I got it down to three minutes.)

@TimWardCam @dougmerritt @colinstu
Nice! That sounds impressive
I guess i brought a lot of assumptions of my own ๐Ÿ™ƒ

But i assume you did much better than AI would have

@RnDanger @dougmerritt @colinstu Dunno. It was rewriting some multiply nested VB loops running thousands of SQL queries with a single query containing several outer joins (my party trick at the time). OK, a bit more complicated than that, but not much. An AI *might* have been able to do that, if it had a reasonable feel for the query optimiser. (The Access Jet engine, which was surprisingly good in some unexpected areas. Like multiple outer joins.)