js-astcompressor-prototype 介绍
js-astcompressor-prototype 是调查二进制 AST
表现方式的研究原型。此项研究能发现压缩后大小、压缩前大小、复杂度与解码速度之间的最佳平衡。
示例代码:
(function (root, factory) { if (typeof define === 'function' && define.amd) { define(['exports'], factory); } else if (typeof exports !== 'undefined') { factory(exports); } else { factory((root.asmExpressionChain = {})); } }(this, function (exports) { var BinaryPrecedences = ([ ["*", "/", "%"], ["+", "-"], ["<<", ">>", ">>>"], ["<", "<=", ">", ">=", "in", "instanceof"], ["==", "!=", "===", "!=="], ["&"], ["^"], ["|"], ["&&"], ["||"] ]).map(function (p) { var result = Object.create(null); for (var i = 0, l = p.length; i < l; i++) result[p[i]] = true; return result; });
js-astcompressor-prototype 官网
https://github.com/WebAssembly/js-astcompressor-prototype
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。