A modern, user friendly, generic, type-safe and fast C99 container library: String, Vector, Sorted and Unordered Map and Set, Deque, Forward List, Smart Pointers, Bitset and Random numbers. (by tylov)

STC Alternatives

Similar projects and alternatives to STC

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better STC alternative or higher similarity.

Suggest an alternative to STC

STC reviews and mentions

Posts with mentions or reviews of STC. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-06-30.
  • boost::unordered map is a new king of data structures
    10 projects | | 30 Jun 2022
    When I developed CMAP, (unordered map in C), I made a benchmark comparing with a number of C++ hash maps, and they all perform 2-4 times faster than std::unordered_map. Tessil robin-map is the fastest overall here.
  • How would I go about implementing a C++ map or unordered_map in pure C?
    3 projects | | 26 Jun 2022
  • Containers Library in C
    2 projects | | 12 Jun 2022
    u/attractivechaos: I relate this to my own STC container library, which is a "true" templated library. When specifying a raw pointer as value type for the hashmap, and no value destructor, it behaves like a non-owning container. The user therefore manage the pointed-to data elements (or "nodes"), and can apply the "trick" you mention, so there is no memory size advantage for the intrusive map over a hashmap in this regard.
  • Modern programming languages require generics
    3 projects | | 24 May 2022
  • How different is C++ from C? Contrasting simple Unix SORT programs
    3 projects | | 13 May 2022
    But the most common that I know of is this one: There's also this one mentioned above
    3 projects | | 13 May 2022
    To illustrate, using a generic typesafe container lib, like my own STC, it is just as simple to write this in C. Also uses RAII (c_auto macro). cvec is templated, here using the lib's string type, so cvec_str is already pre-configured, but containers can use any custom elements type-safely:
  • Upgrading my PRNG for procedural generation
    1 project | | 6 May 2022
    sfc64 is about the same speed as sfc32, so almost twice as fast per bit generated on most 64-bit platforms. I have a slightly modified version in my STC library which is equally fast, but supports threads/streams, similar to PCG. The lack of streams or jump function is one of the few criticisms to sfc. In my mind it is merely a theoretical limitation, as the chance for repeating subsequence are incredible small, but if you need that assurance, my variant can be interesting as it is quite a bit faster than e.g. xoshiro and not sensitive to "bad" seeds.
  • Are you using Boost intrusive containers?
    1 project | | 3 May 2022
    The background for the question is that many C programmers swears to use intrusive containers as the superior alternative to STL-style containers. I have a templated C container library in STL style (compiles in C++, works with standard layout types only), and have argued that for most cases, traditional STL-style containers are more natural and easier to manage. But I believe there are situations where intrusive containers are better.
  • Generic C Library
    3 projects | | 28 Apr 2022
    I didn't intend to mention my own templated STC container library, but I am confident that it is superior to any intrusive or other generic container C libraries for that matter. That's a bold statement, but I'll be happy to compare anything from usability (API), memory usage, speed or library footprint with any other container lib, intrusive or not.
  • "double free or corruption (out)" what is causing this to happen here?
    1 project | | 3 Apr 2022
    FYI. You can write this portable, more robustly with my STC library with less lines, but it takes some effort to understand the workings of a library too. Note that the non-portable POSIX getline() includes the newline char in the line (seldom desirable). cstr_getline() does not. c_autovar is an optional convenience macro, you can use ..init() and then ..drop() at end of function instead.
  • Help in starting
    1 project | | 13 Mar 2022
    Just remember, if you choose C and you need to use the basic containers that C++ includes in its standard library like vectors and maps, use this library, it will make your life so much easier!
  • Checking array for value
    1 project | | 1 Mar 2022
    If you use my STC cset, you can do something like this.
  • What is High level language
    1 project | | 19 Feb 2022
    C also "becomes" a more high level language if you program using higher level datatype abstractions, which you can with my type-safe templated container library, STC
  • Anyone knows if this is C11 conformant?
    1 project | | 3 Feb 2022
    Reasonable question. In my STC library I use it to emulate "structured binding" as found in c++ and other languages:
  • What's the best way to dynamically allocate memory when reading strings from a file?
    1 project | | 25 Nov 2021
    You could use a library, like my STC. This is a slighlty simplified example from the repo. Note the usage of RAII (c_autovar macro). cstr_getline() allocates needed memory for the string. You can check errno for errors after read_file(). Also note that posix getline() includes the newline char, whereas cstr_getline() does not.


Basic STC repo stats
10 days ago

tylov/STC is an open source project licensed under MIT License which is an OSI approved license.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Find remote jobs at our new job board There are 2 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.