【文件属性】:
文件名称:liquid-c:C中的液体性能扩展
文件大小:64KB
文件格式:ZIP
更新时间:2021-05-17 15:21:13
C
液体:: C
C语言中的液体Ruby宝石的部分本地实现。
安装
将这些行添加到应用程序的Gemfile中:
gem 'liquid', github: 'Shopify/liquid', branch: 'master'
gem 'liquid-c', github: 'Shopify/liquid-c', branch: 'master'
然后执行:
$ bundle
用法
require 'liquid/c'
然后只需使用已记录的液体宝石API即可。
限制
输入字符串假定为UTF-8编码的字符串
Tag#parse(tokens)被赋予Liquid :: Tokenizer对象,而不是字符串数组,该对象仅实现shift方法来获取下一个令牌。
表现
将Liquid-C的性能与普通Liquid Run进行比较
bundle exec rake compare:lax
最新的基
【文件预览】:
liquid-c-master
----.gitignore(107B)
----README.md(2KB)
----.rubocop.yml(209B)
----.github()
--------workflows()
----liquid-c.gemspec(1KB)
----test()
--------unit()
--------liquid_test_helper.rb(711B)
--------integration_test.rb(270B)
--------test_helper.rb(376B)
----Gemfile(461B)
----performance()
--------c_profile.rb(672B)
----performance.rb(308B)
----ext()
--------liquid_c()
----LICENSE.txt(1KB)
----lib()
--------liquid()
----Rakefile(3KB)