Sha256: 752847252dc0df4aa407c15970a76fe35f0642264ae075ce134934e851ad3435
Contents?: true
Size: 370 Bytes
Versions: 5
Compression:
Stored size: 370 Bytes
Contents
require 'pastel' require 'benchmark/ips' pastel = Pastel.new Benchmark.ips do |bench| bench.config(time: 5, warmup: 2) bench.report('color decorate') do pastel.decorate('string', :red, :on_green, :bold) end bench.report('dsl styling') do pastel.red.on_green.bold('string') end bench.compare! end # color decorate: 14K/s # dsl styling: 10K/s
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
pastel-0.5.3 | benchmarks/speed.rb |
pastel-0.5.2 | benchmarks/speed.rb |
pastel-0.5.1 | benchmarks/speed.rb |
pastel-0.5.0 | benchmarks/speed.rb |
pastel-0.4.0 | benchmarks/speed.rb |