<commit_before>= ffaker

Fast Faker == Faker refactored. http://rubygems.org/gems/ffaker

= Faker

A port of Perl's Data::Faker library that generates fake data. http://rubygems.org/gems/faker

== Usage

  require 'ffaker'
  Faker::Name.name => "<NAME>"
  Faker::Internet.email => "<EMAIL>"

== Ffaker / Faker

Faker and Ffaker APIs are mostly the same, although the API on ffaker keeps
growing with its users additions. In general, the only difference is that you
need to:

  gem install ffaker

and then

  require 'ffaker'

instead of "faker" with only one f.

== Faster? does it really matter ?

Ffaker was initially written in an effort to speed up a slow spec suite. Bear
in mind, if your spec suite is slow, chances are the generation of random data
will not account for much of the run time.

Since then, the original faker gem has become faster (at the moment it did not
seem it was mantained). Nevertheless, ffaker is still about 20x faster than
faker.

$ cat scripts/benchmark.rb

  # ...
  N = 10_000

  Benchmark.bm do |rep|
    rep.report("generating #{ N } names") do
      N.times do
        Faker::Name.name
      end
    end
  end

* ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2011.03
<commit_msg>Update README.rdoc to fix a small typo<commit_after>= ffaker

Fast Faker == Faker refactored. http://rubygems.org/gems/ffaker

= Faker

A port of Perl's Data::Faker library that generates fake data. http://rubygems.org/gems/faker

== Usage

  require 'ffaker'
  Faker::Name.name => "<NAME>"
  Faker::Internet.email => "<EMAIL>.info"

== Ffaker / Faker

Faker and Ffaker APIs are mostly the same, although the API on ffaker keeps
growing with its users additions. In general, the only difference is that you
need to:

  gem install ffaker

and then

  require 'ffaker'

instead of "faker" with only one f.

== Faster? does it really matter ?

Ffaker was initially written in an effort to speed up a slow spec suite. Bear
in mind, if your spec suite is slow, chances are the generation of random data
will not account for much of the run time.

Since then, the original faker gem has become faster (at the moment it did not
seem it was maintained). Nevertheless, ffaker is still about 20x faster than
faker.

$ cat scripts/benchmark.rb

  # ...
  N = 10_000

  Benchmark.bm do |rep|
    rep.report("generating #{ N } names") do
      N.times do
        Faker::Name.name
      end
    end
  end

* ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2011.03

{'fraction_non_alphanumeric': 0.08512299882858258, 'fraction_numerical': 0.028114017961733698, 'mean_word_length': 3.3794871794871795, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3333908', 'n_tokens_mistral': 899, 'n_tokens_neox': 808, 'n_words': 350}