Open ShiinaSekiu opened 2 hours ago
Thank you very much! There are probably a handful of locations, where it is possible to get around throwing and catching.
The more pressing issue wrt. performance is not rooted in this project, though, but in KmmResult
, which cannot be a value class, as it would make it impossible to export it to an XC framework. Thus, catching
incurs a performance hit. At the same time runCatching
catches more than it should, so we require catching
.
By the way, why doesn't the peek()
method of this class have a corresponding peekOrNull()
method?
I'll not that down for improving API docs. peek already returns null
, if no more children are left. All the feedback you have provided so far is really appreciated!
https://github.com/a-sit-plus/signum/blob/e8f9bd4a0be5a9018e6e4ffe137b22191b06c1e1/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Elements.kt#L432-L443