Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a ridiculously frugal version without any STL #61

Open
2 tasks
xparq opened this issue Nov 25, 2023 · 0 comments
Open
2 tasks

Create a ridiculously frugal version without any STL #61

xparq opened this issue Nov 25, 2023 · 0 comments
Labels
question Further information is requested

Comments

@xparq
Copy link
Owner

xparq commented Nov 25, 2023

A single copy of the original (for inserting '\0'-s), with "home-grown" index arrays (with a templated index type, 1-byte by default, just for the vibe :) ), even templated, with a fixed-size allocator (maybe even default?)...
(Obviously, with no string vector/map "all" results etc. But the rest should be fine. People could did it with C... ;) )

malloc, memcpy, perhaps memcmp still needed, so then string.h is already inevitable -- but that's still nowhere near the entire tanker ship of the STL (with tiny little single parts of it like <compare> secretly #including 53(! :-o ) others, at 500K total (4x the size of an entire UPXed gmake.exe :) ) with MSVC)...

  • Should be optimized for min. allocations and RAM usage in general. -- Albeit, if there's a heap anyway, allocophobia at args processing time is kinda funny... (Fragmentation's still a thing, though.)
  • And since option lookups are also used internally, in the loop, that should be kinda fast, too.
@xparq xparq added the question Further information is requested label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant