Broad support for many different chips is precisely why Arduino is so bad. It has to check pin numbers against a gigantic table for every gpio call.
You want chip-specific libraries. When the software is designed for the hardware everything works better.
The native AVR and esp-IDF frameworks are very good. There's also micropython and circuit python. I've heard good things, but I don't partake in Python.
Personally I think attempting to provide a cross-platform library for microcontrollers is an enormous mistake. This is not x86, you can't rely on any CPU feature existing, which results in awful branching code in places that in a sane framework is a single instruction updating a CPU register
I feel like this has to be a toolchain issue, there's no reason the pin number -> register table couldn't be resolved at compile time, similar with conditionally compiling certain things based on the CPU features.
I'm not saying it's not a real or an easy problem, just that I wonder if it truly is the reason Arduino is "bad"