QRCoder
QRCoder copied to clipboard
Replace string concatenation with StringBuilder or string interpolation
There are lots of intermediate allocations, that could be avoided.
For .NET 10 the JIT will probably elide them, but for .NET 6+ string interpolation should be used. And IIRC for older targets only some attributes need to be polyfilled, so that the compiler can emit the proper code.
Originally posted by @gfoidl in https://github.com/Shane32/QRCoder/pull/640#discussion_r2405640648