2 ms·
I've used it for performance boosts. It's not perfect, but if I paste a method (my own code) and say 'rewrite in fewer lines' to simplify, or 'rewrite to run f
by beatthatflight 3y ago
I've used it for performance boosts. It's not perfect, but if I paste a method (my own code) and say 'rewrite in fewer lines' to simplify, or 'rewrite to run faster', I've been in awe at what it comes up with that hadn't occured to me. Tricks in python I wasn't aware of, or hadn't considered using a different datastructure that can be searched faster (for some reason my brain always defaults to lists, when a set may be better, for example).
It absolutely makes errors though, so unit tests are critical, but I've got code running so much faster as a result.