Open Zelenyy opened 5 years ago
Sorry for the late reply. Missed the issue.
That is what contexts are for. For optimized operations you need to use dedicated context. Specifically if you use more than one operations. On first operation context will reinterpret or transform the buffer into the form it likes, but on subsequent operations it will use optimized buffer form. Operations could be added as extensions for existing contexts.
If you use a single buffer operation on numbers, you can always use Buffer.auto
factory. It does not guarantee optimal performance for custom classes, but for simple elements it should work just fine.
Should be part of #61
For example, we have some function:
How choice output Buffer sub-class for function? If always return a generic buffer, this could be slow, but creating specific realization of
someFunction
request more boilerplate code.