countwords
llfio
Our great sponsors
countwords | llfio | |
---|---|---|
43 | 25 | |
209 | 768 | |
- | - | |
5.9 | 6.3 | |
about 2 years ago | 7 days ago | |
Rust | C++ | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
countwords
-
How fast is really ASP.NET Core?
"dang, I didn't know that was 50x faster than the idiomatic way" or "hey, I didn't know that this implementation in the stdlib prioritized this over that and made this so slow, that's interesting" -- .e.g, there's some kinda neat language details to be found in something like Ben Hoyt's community word count benchmarks repo and 'simple' vs 'optimal' code: https://github.com/benhoyt/countwords
-
Correct name for word matching problem
It benchmarks programs that count the total number of unique words in some input. It's not exactly equivalent to your problem, but it's similarish. All of the programs used some kind of hash map for lookups, but I contributed a program that used a trie. Its performance in my experience varies depending on the CPU interestingly enough. On my old CPU (i7-6900K) it was a little slower, but on my new cpu (i9-12900KS) it was faster.
-
Performance comparison: counting words in Python, C/C++, Awk, Rust, and more
Why not read the source code? :-)
I wrote comments explaining things: https://github.com/benhoyt/countwords/blob/8553c8f600c40a462...
-
do you guys prefer functional programming style when using rust?
My own code example of a drastic speed up (~25%) simply replacing a couple of for loops with iters: https://github.com/benhoyt/countwords/pull/115
- Ripen scripting engine (Similar to RetroForth, but tiny)
- Performance comparison: counting words in Python, Go, C++, C, AWK, Forth, and Rust
-
The difference between Go and Rust
And yet Go was faster than Rust in a simple app that count words: https://benhoyt.com/writings/count-words/
-
How to Rapidly Improve at Any Programming Language
> but the performance profiles & characteristics that we must know about in order to make a choice on which tool to use. And it shouldn't be that each user has to figure it out on their own, dig into PR's or whatever.
That's an interesting take – I like the idea of a catalog of standard tasks with implementations in several languages as well as their performance characteristics. I suppose Rosetta Code gets the ball rolling with this, but it's missing some performance metrics. It reminds me of [Ben Hoyt's piece](https://benhoyt.com/writings/count-words/) on counting unique words in the KJV Bible in different languages.
-
Faster string keyed maps in Go
This article shows that map lookups can be optimized by using the (unintuitive) pattern:
- Go beats out several top languages including Rust in this performance matchup
llfio
-
File IO question if something is in stdlib or not
The reference library can be found at https://ned14.github.io/llfio/
-
Is there a good cross-platform (Windows / Linux) C or C++ library for file I/O?
Thanks for the suggestions, which I have transposed into https://github.com/ned14/llfio/issues/106
-
Should I use platform dependent file IO instead of basic_fstream when performance matters
There was an effort to get an afio library accepted into boost in the past. I believe the most current work on that library is happening here nowadays : https://github.com/ned14/llfio I'm not sure if it is considered production-ready or not. But I couldn't see any mention of it in the replies so I figured I would fix that!
-
File Handling in C++
It has an implementation: LLFIO
- Proposed Standard Secure Sockets reference implementation complete
-
Getting started with Boost in 2022
I'm a fan of Interprocess, used it for over a decade. But for mmapping I've switched to LLFIO and recommend it highly. (Plugging so Niall doesn't have to.)
-
Networking TS: first impression and questions;
Since that post, I have the reference implementation library very nearly passing its test suite https://github.com/ned14/llfio/pull/89. Once it's done I'll start very slowly writing its proposal paper for WG21 SG4. Should land before this summer.
- P2300 (Sender/Receiver) is DEAD in the water for C++23 !!!
-
IO library for embedded devices - looking for contributor
FYI it doesn't solve quite what you're solving, but I've been careful to ensure https://github.com/ned14/llfio works well on Freestanding and < 64 Kb microcontrollers and I know Victor has been careful to ensure a good subset of std::format could work well on embedded. In other words, the i/o story for embedded C++ may improve greatly in the next few years.
-
Weird fstream behavior after MSVC upgrade
If you want stronger guarantees than iostreams can give you, either use the OS-specific calls or a wrapper of said calls (e.g. https://github.com/ned14/llfio, disclaimer I'm the owner of that). Note that even in LLFIO, there is no concept of "seek to the end" because that's racy so we don't implement that. All you get is atomic append, otherwise you're on your own to coordinate what "end of file" means.
What are some alternatives?
CPython - The Python programming language
mio - Cross-platform C++11 header-only library for memory mapped file IO
coreutils - upstream mirror
libunifex - Unified Executors
parallel-hashmap - A family of header-only, very fast and memory-friendly hashmap and btree containers.
mold - Mold: A Modern Linker 🦠
securitytxt.org - Static website for security.txt.
wyhash - The FASTEST QUALITY hash function, random number generators (PRNG) and hash map.
corrade - C++11 multiplatform utility library
leocad - A CAD application for creating virtual LEGO models
robin-hood-hashing - Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20