WIP: Attempts to minimize bytes, some token golf as well #1
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 PR is a work in progress. I have not been able to fully test all of the changes yet, as I haven't re-explored the whole story. I will do so, but wanted to submit this for feedback beforehand.
before (minified): 6475 tokens, 32610 chars, 99.38% compressed
after (minified): 6350 tokens, 30032 chars, 97% compressed
The biggest savings came from altering the "JSON" syntax to not require quotes around most strings. This makes them harder to edit in other json-aware programs, but still pretty much entirely human readable and hand-editable.
Other savings came from inlining functions and typical token golf optimizations. I suspect there's another 50 tokens, 500 chars, and 1% compressed size to be saved through further more complicated efforts of this sort. I'd be happy to attempt more in that direction if you're interested.
I will comment a few places in the PR that stand out as notable and possibly objectionable, some of which are aesthetic in nature.
If these changes are welcome here, I would also be happy to port the relevant ones over to Minima.