🍺 BREW Explorer

← all formulae

ffc.h

brew install ffc.h v26.04.01 Apache-2.0

Single-header C99 accelerated float/double parsing

8
30-day installs · #9376
36
90-day · #8166
70
365-day · #10145
189
★ GitHub stars · updated 2mo ago

Build dependencies

GitHub topics

c high-performance neon parsing portable simd single-header single-header-library sse2

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "cmake"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Single-header C99 accelerated float/double parsing",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:37:35+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "ffc.h",
  "github_default_branch": "main",
  "github_last_commit_at": "2026-06-15T03:01:18Z",
  "github_readme_excerpt": "## ffc.h\nA direct and faithful c99 single-header port of Daniel Lemire\u0027s fast_float library.\n\nSee [fast_float](https://github.com/fastfloat/fast_float) for much more information on the algorithm and other\ncharacteristics of the approach.\n\nExample\n```c\n#include \u003cstdio.h\u003e\n#include \u003cstring.h\u003e\n\n#define FFC_IMPL\n#include \"ffc.h\"\n\nint main(void) {\n   char *input = \"-1234.0e10\";\n   ffc_outcome outcome;\n   double d = ffc_parse_double_simple(strlen(input), input, \u0026outcome);\n   printf(\"%s is %f\\n\", input, d);\n\n   char *int_input = \"-42\";\n   int64_t out;\n   ffc_parse_i64(strlen(int_input), int_input, 10, \u0026out);\n   printf(\"%s is %lld\\n\", int_input, out);\n\n   return 0;\n}\n```\n\nFor use within a larger parser, where you don\u0027t expect to reach the end of input, use\nthe non-simple variants as the `ffc_result` includes the stopping point, just like in fast_float\n\n## API\n\n### Float Parsing\n\n- `double ffc_parse_double_simple(size_t len, const char *s, ffc_outcome *outcome)`  \n  Parses a double from a string of given length. Returns the parsed value, outcome indicates success/failure.\n\n- `ffc_result ffc_parse_double(size_t len, const char *s, double *out)`  \n  Parses a double from a string, storing result in `out`. Returns `ffc_result` with outcome and end pointer.\n\n- `float ffc_parse_float_simple(size_t len, const char *s, ffc_outcome *outcome)`  \n  Parses a float from a string of given length. Returns the parsed value.\n\n- `ffc_result ffc_parse_float(size_t len, const char *s, float *out)`  \n  Parses a float from a string, storing result in `out`.\n\n### Integer Parsing\n\n- `ffc_result ffc_parse_i64(size_t len, const char *s, int base, int64_t *out)`  \n  Parses a signed 64-bit integer from string with given base.\n\n- `ffc_result ffc_parse_u64(size_t len, const char *s, int base, uint64_t *out)`  \n  Parses an unsigned 64-bit integer from string with given base.\n\n### Types\n\n- `ffc_outcome`: Enum indicating parse result (OK, OUT_OF_RANGE, INVALID_INPUT)\n- `ffc_result`: Struct with `ptr` (end of",
  "github_repo": "kolemannix/ffc.h",
  "github_stars": 189,
  "github_topics": [
    "c",
    "high-performance",
    "neon",
    "parsing",
    "portable",
    "simd",
    "single-header",
    "single-header-library",
    "sse2"
  ],
  "homepage": "https://github.com/kolemannix/ffc.h",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 8,
  "installs_365d": 70,
  "installs_90d": 36,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "Apache-2.0",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "ffc.h",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 9376,
  "rank_365d": 10145,
  "rank_90d": 8166,
  "raw_hash": "1f1ceb1642143eaa",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/f/ffc.h.rb",
  "tap": "homebrew/core",
  "test_dependencies": [
    "cmake"
  ],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "26.04.01",
  "versioned_formulae": [],
  "why_use_this": null
}