Skip to content

Releases: dasmig/dasmig-core

v1.2.0

Choose a tag to compare

@dasmig dasmig released this 18 Oct 13:16
c51bc8e

Shared dasmig::sex (core/sex.hpp: sex_name, parse_sex) and country code helpers (core/country.hpp: is_alpha2, unknown_country_error). Additive; generated output is unchanged.

v1.1.1

Choose a tag to compare

@dasmig dasmig released this 17 Oct 01:12
1e50a5e

Compact key index and TSV cells, and a sized file read: name-generator's full tier loads in 1.1 s instead of 1.7 s and holds 267 MiB instead of 593 MiB. Output is unchanged.

v1.1.0

Choose a tag to compare

@dasmig dasmig released this 16 Oct 22:03
916a896

What's Changed

  • feat: batch generation, JSON Lines and CSV writers (1.1.0) by @dasmig in #4

Full Changelog: v1.0.2...v1.1.0

v1.0.2

Choose a tag to compare

@dasmig dasmig released this 16 Oct 21:53
45f2a12

What's Changed

  • docs: put the MIT notice in every header by @dasmig in #2
  • perf: fewer allocations in json_writer and weighted_table (1.0.2) by @dasmig in #3

Full Changelog: v1.0.1...v1.0.2

v1.0.1

Choose a tag to compare

@dasmig dasmig released this 16 Oct 02:57
bc0fe8f

Faster TSV parsing, identical output. Libraries keep DASMIG_CORE_REQUIRE(1, 0); pick it up with tools/sync-core.sh.

Changed

  • tsv parses plain decimals through an exact fast path (Clinger's): when the significant digits form an integer up to 2^53 and the power of ten is within ±22, one IEEE multiply or divide gives the correctly rounded double. Anything else, and platforms with excess precision (FLT_EVAL_METHOD != 0), use the general parser as before.
  • Why: Emscripten's libc++ has no floating-point from_chars, so every cell went through istringstream and musl's software long double strtod. That was about 45% of the persona WebAssembly module's startup, which drops from 1.4 s to 0.35 s in Node 22.

Output is identical

  • A new test compares the parser with strtod bit for bit on edge cases and 50,000 random decimals.
  • All 4.94 million numeric cells in the nine libraries' data (both tiers) parse to the same bits; 99.99% take the fast path.
  • The persona module built with this core gives the same 850 personas and data hash.

v1.0.0

Choose a tag to compare

@dasmig dasmig released this 12 Oct 16:12

First stable release. The seven dasmig generator libraries now build on the core, so its output contract is fixed for major version 1: a seed gives the same bits on every supported compiler, standard library and CPU (GCC, Clang with libc++, Apple Clang, MSVC, Emscripten; x86-64 and ARM64), checked by known-answer tests in CI.

Output is identical to 0.3.4. Libraries require it with DASMIG_CORE_REQUIRE(1, 0).

Contents

  • rng: xoshiro256** seeded through SplitMix64, with split(label) / split(index) for independent streams.
  • Distributions with fully specified algorithms: uniform_int (Lemire), uniform_real, bernoulli, normal (Marsaglia polar), lognormal, discrete, shuffle, sample_indices, pick; own exp/log and FMA-proof arithmetic.
  • tsv reader with typed columns and file:line: column errors; layered_table for data layers (add / override / replace, disabled rows, all-or-nothing validation, data_hash()).
  • weighted_table, json_writer, seed_signature, utf8, dataset, resources (resource probing and compiled-in data; scripts/embed.py).

Since 0.3.3

  • layered_table indexes keys once, in a hash map: loading name-generator's 2.3 million rows went from 2.5 s to 0.67 s in the table, with the same rows, order, hashes and errors (0.3.4).