-
Trying to grok the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Regarding the performance penalty, I have submitted the benchmark of VanJS into https://github.com/krausest/js-framework-benchmark (see krausest/js-framework-benchmark#1353). During the submission, I tried a few micro-optimization techniques, including to avoid capturing the dependencies every time the binding function is called if we can know the dependencies ahead of time. But none of the micro-optimizations lead to statistical difference in the benchmark result. So I guess the overhead of accessing That said, if you are accessing |
Beta Was this translation helpful? Give feedback.
curDeps
is alwaysundefined
ifval
is being accessed outside binding functions.Regarding the performance penalty, I have submitted the benchmark of VanJS into https://github.com/krausest/js-framework-benchmark (see krausest/js-framework-benchmark#1353). During the submission, I tried a few micro-optimization techniques, including to avoid capturing the dependencies every time the binding function is called if we can know the dependencies ahead of time. But none of the micro-optimizations lead to statistical difference in the benchmark result. So I guess the overhead of accessing
val
property should be minimal.That said, if you are accessing
val
property a lot in a binding function, you'…