Repository navigation
Implement HTM without eval, with optional mini version - #62
Merged
Merged
Conversation
Use Map for caching when available, otherwise fall back to the old caching scheme based on string keys. These changes were code-golfed to their current form together with @developit.
[mini] inline build to save a few more bytes
Collaborator
Author
Owner
|
+1 to your git-fu, history of these implementations is important since to document how you evolved this over the past month 👍🧙♂️ |
This was referenced Feb 20, 2019
developit
approved these changes
Feb 25, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request combines the modifications from PRs #53 and #59. Compared to the master it adds two major features:
The major difference from PRs #53 and #59 is that the library can be compiled in two modes based on the flag
MINI(maybe settable with the feature suggested at developit/microbundle#312). WhenMINI=false(the default) the compiled library resembles the one from #53. The library uses Map for caching when available, and otherwise falls back to the caching scheme used by the currentmasterbranch. The resulting library size is smaller compared to the current master, and faster when benchmarked with theperf-test-harnessbranch (although modified to use tagged templates whenever possible).The master version:
The
MINI=falseversion:When
MINI=truethe library is compiled like #59: the results are directly evaluated without caching. The library is then much slower, but the resulting size is small: