Yeah.... maybe . I think AI is still too prone to go down rabbit holes and not understand the whole picture well enough to come up with good optimisations. It's probably good at micro-optimisation, e.g. pre-allocating arrays. But is it going to realise that you don't need that array in the first place? I dunno. On the other hand it does mean there's no excuse for writing your program using Python or Electron or whate…
Are you suggesting Electron is slow? What evidence do you have? There may be a +200ms start up time compared to a native application; is that so bad? Besides a bootup that is no longer than your browser's, everything else inside an Electron app can be identically fast to a native application. Please be a better filter - do not spread bad memes.
HTML layout and rendering is almost never as fast as GUIs like Qt. Also Electron apps usually use JavaScript which is slower than "fast" languages like C++/Rust/Kotlin/etc.
The reason people use Electron is because it's easy, especially if you have to have a website anyway. Slack is a great example of this. They already have a full website so it's kind of silly to redo the whole thing...
Unless AI makes it easy. We'll see I guess.