Writing memory efficient C structs

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. Pandas

    Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more

    https://github.com/pandas-dev/pandas/issues/58062 :

    > On disk Parquet appears to store the category data as logical type String which is compressed with snappy and encoded

    Arrow Flight RPC handles nested structs with enums over the wire somehow too FWIU

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. BitLib

    BitLib is a C++23 library offering STL-like containers, views, and algorithms for bit-level data manipulation. It features efficient, sliceable bit_array and bit_vector types, custom literals, mdspan accessors, and bit-parallel algorithms—ideal for fine-grained data access, compression, or custom numerical formats. (by PeterCDMcLean)

    I've been working on an open source library that, while it doesn't solve bitfields, can provide convenient ergonomic access to bit-granular types:

    https://github.com/PeterCDMcLean/BitLib

    You can inherit from bit_array and create a pseudo bitfield:

  4. entt

    Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more

    Optimizing struct layouts is cool. but if your motivation is to pack more monsters in your game definitely consider transposing your row oriented monster struct into a column oriented entity using Entity Component System.

    Example framework:

    https://github.com/skypjack/entt?tab=readme-ov-file

    It has benefits besides memory/cache optimizations. It organizes logic in a much more composable way that is friendly for reuse.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Arenas in Rust

    4 projects | news.ycombinator.com | 3 Oct 2025
  • Using Jolt with flecs & Dear ImGui: Game Physics Introspection

    4 projects | dev.to | 17 Apr 2024
  • Crash Course: entity component system

    1 project | news.ycombinator.com | 20 Jul 2023
  • Where can I find the juiciest, most complex and modern c++ code?

    2 projects | /r/cpp_questions | 9 Jun 2023
  • Flecs – A fast entity component system for C and C++

    2 projects | news.ycombinator.com | 4 Apr 2023

Did you know that C++ is
the 7th most popular programming language
based on number of references?