Some marshalers reuse the buffer. For example, Gotiny applies an encoder which always returns the same buffer. For a better comparison it should allocate the bytes like the others do.
An other option is to allow each codec to use the fastest option available, including buffer reuse. Or, we could measure both with a clear distinction for the reuse case, like b.Run("reuse", ….
The issue was noted by @inkeliz with his Karmen format.
Some marshalers reuse the buffer. For example, Gotiny applies an encoder which always returns the same buffer. For a better comparison it should allocate the bytes like the others do.
An other option is to allow each codec to use the fastest option available, including buffer reuse. Or, we could measure both with a clear distinction for the reuse case, like
b.Run("reuse", …
.The issue was noted by @inkeliz with his Karmen format.