We definitely make use of the non-vararg methods all over our code.
While it's true that garbage collector technology has improved to keep pause times small and consistent with heap growth, that still doesn't mean that the benefits of low garbage code should be ignored. We see it as a two pronged approach, - 1 have a great collector, - 2 avoid creating unnecessary garbage to keep the collector great. In order to justify these methods, we would have to quantify the impact and measure the performance which we haven't done, sorry I can't offer you numbers on this. I know that some low latency firms switch logging off completely, but there are those that strike a balance for developer sanity. I'm not sure if the original goal of this thread was to remove those methods on the basis that "the array gets created anyway" which suggests it's all been a bit of a placebo?, but for what it's worth: we would prefer to see an outcome that results in less garbage, i.e. retain the methods and actually make sure they work as intended in avoiding garbage creation. Hope that makes sense 🙏 Kind regards, Dan Burrell On Sun, Mar 2, 2025 at 10:42 PM Piotr P. Karwasz <pi...@mailing.copernik.eu> wrote: > Hi Remko, > > On 2.03.2025 04:27, Remko Popma wrote: > > In my work we create trading applications that send orders to the stock > exchange when market conditions change. If the JVM would decide to stop the > world to collect garbage, we might not get the orders sent out in time. > > > > Our whole stack (messaging, persistence, business logic) is garbage > free. We log a lot, to ensure visibility on what the application is doing, > and for fast troubleshooting. Log4j being garbage free is essential to our > success. > > I read some opinions that due to the improvements in Java's garbage > collector, garbage-free code has lost its importance for Java trading > applications. Unfortunately I don't seem to find those links again. > > Anyway I am happy to see that those opinions were largely exaggerated. > > Piotr > > -- Daniel Burrell Senior Software Engineer | B2C2 Ltd. +44 7894 66 80 61 | daniel.burr...@b2c2.com Digital asset pioneer building the ecosystem of the future e-FX Awards 2022: Best liquidity provider for crypto derivatives -- *This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee you must not disseminate, distribute or copy this e-mail. Please notify us on regulat...@b2c2.net <mailto:regulat...@b2c2.net> immediately if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.*