Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (64 sloc) 2.6 KB


Fast Faker == Faker refactored, cleaner and faster.


A port of Perl's Data::Faker library that generates fake data.


require 'ffaker' => "Christophe Bartell" => ""

Ffaker / Faker

The are only two differences between faker and ffaker. The first one is that you need to

gem install ffaker

and then

require 'ffaker'

instead of “faker” with only one f.

The API is pretty much the same as before.

The second difference is that Faker::VERSION is no longer a module, so instead of accessing the version like this:

Faker::VERSION::STRING # faker

you'll need to access it like this:

Faker::VERSION # ffaker

Fork it/ping me if you feel like adding more goodies to it.

Faster? does it really matter ?

$ cat scripts/benchmark.rb

# ...
N = 10_000 do |rep|"generating #{ N } names") do
    N.times do
  • ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2009.10

                    user     system      total        real
    Faker       9.240000   0.020000   9.260000 (  9.297381)
    Fast Faker  0.060000   0.000000   0.060000 (  0.109047)
  • ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]

                    user     system      total        real
    Faker      74.980000   0.110000  75.090000 ( 75.881142)
    Fast Faker  0.050000   0.000000   0.050000 (  0.052292)

DISCLAIMER: I have no idea why I'm getting such bad numbers for traditional faker on 1.9, but I'm not making this up. Try it in your own machine, your mileage may vary!



  • 0.4.0

Api additions by Rafael Souza # => 40.6609944585817
Faker::Geolocation.lng # => -73.8454648940358
Faker::Address.neighborhood # => "Renton West"


  • Even though the API is pretty simple, better rdoc documentation would not hurt.

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don't break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.


Copyright © 2010 Emmanuel Oga. See LICENSE for details. Copyright © 2007 Benjamin Curtis

Jump to Line
Something went wrong with that request. Please try again.