Created
April 15, 2017 11:21
-
-
Save sachin21/df288d8f36b75356175bee5332c93643 to your computer and use it in GitHub Desktop.
Faker VS FFaker benchmarks
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
require 'benchmark/ips' | |
require 'faker' | |
require 'ffaker' | |
Benchmark.ips do |x| | |
x.report('faker') { Faker::Name.name } | |
x.report('ffaker') { FFaker::Name.name } | |
x.compare! | |
end |
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
Warming up -------------------------------------- | |
faker 1.590k i/100ms | |
ffaker 42.837k i/100ms | |
Calculating ------------------------------------- | |
faker 18.691k (± 5.6%) i/s - 93.810k in 5.036465s | |
ffaker 523.357k (± 6.2%) i/s - 2.613M in 5.017709s | |
Comparison: | |
ffaker: 523357.4 i/s | |
faker: 18691.2 i/s - 28.00x slower | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment