2 pointsby Clemcl3 hours ago3 comments
  • Whoozat202031 minutes ago
    Wow! 7x performance? I'm giving this a try!

    Out of a Cyber Security interest, does this solve buffer overruns dead in their tracks?

  • Clemcl3 hours ago
    I’ve been working on a C string library called FastSafeStrings.

    The goal is to keep the performance of traditional C string handling while making it safer and avoiding repeated scans (strlen, strcat, delimiter searches).

    Key ideas:

    * Length-aware strings (O(1) length, no rescanning) * Bounds-safe operations (no buffer overruns) * Fixed-capacity model (no allocations) * Optional support for variable-length (VB-style) records to eliminate input scanning

    In a simple real-world workload (processing 5M small records), it runs about ~7× faster than typical C code using fgets/strcat/strlen.

    This is an early release — I’d really appreciate feedback on:

    * API design (especially the macro-based C interface) * Benchmark fairness and methodology * Edge cases or safety concerns

    GitHub: https://github.com/clemcl/FastSafeStrings

  • Clemcl3 hours ago
    Happy to answer questions.

    This was partly inspired by older systems (PL/I-style descriptors and mainframe-style record processing), where strings and records are length-aware instead of repeatedly scanned.

    The main idea is simple: a lot of C string work ends up rescanning the same data multiple times, and avoiding that can make a big difference in real workloads.