Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Per #54, this commit could be considered a starting point for supporting bindings support in Clojure, not ClojureScript, given the platform differences.
The initial implementation used the starting point @robert-stuttaford posted in the referenced issue.
Performance Tradeoff
A tradeoff here is in order to support sync/async w/ the various runtimes, using
(bound-fn*)
seems to be necessary given the different thread pool implemenations. Counsequently, there looks to be a slight performance hit needing to push/pop thread local vars in the general case. However, manifold seems to a an order of magnitude slower, though still in the microseconds.Not sure the tradeoff ya'll at metosin want to make here. I'll throw in my 2 cents, in that if manifold is being chosen as the async executor, it isn't being chosen for raw performance.
Perf Tests
I ran the following on:
Results of `lein perf-test` before changes
Results of `lein perf-test` after changes