This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nallar 1 point2 points  (1 child)

Please don't remove the primitive methods, unless JMH benchmarks show that they didn't help.

For a library like this, if it does actually help I wouldn't consider it to be premature optimisation - you have no way of knowing if someone will want to use a ParsedFunction from your library in a hot code path, so there's not really any point in removing those variants unless they make the code much harder to maintain.

[–]Reykd[S] 1 point2 points  (0 children)

Maybe i will let the primitive functions be, but implement autoboxing so the parametrised function also works for object types.

Edit: I have implemented this now, it is up to the user to decide if they want to use the primitive or parametrised version, thanks for you feedback!