raikv
word_frequency_nim
raikv | word_frequency_nim | |
---|---|---|
2 | 1 | |
7 | 2 | |
- | - | |
7.3 | 0.0 | |
3 months ago | about 3 years ago | |
C++ | Nim | |
Apache License 2.0 | - |
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.
raikv
-
New x86 micro-op vulnerability breaks all known Spectre defenses
I have a graph for this:
https://github.com/raitechnology/raikv/blob/master/graph/mt_...
The CPU in this case is a Threadripper 3970x, 32 cores, 64 SMT.
My experience is this: When the L3 cache is effective, then the memory latency hiding via memory prefetch works well across SMT threads. If the hashtable load requires a chain walk, the SMT latency hiding is less effective because the calculated prefetch location is not the actual hit. I couldn't get prefetching multiple slots as the load increased to be as effective as prefetching a single slot.
-
Performance comparison: counting words in Python, Go, C++, C, Awk, Forth, Rust
Amusingly, I've done a multi-threaded version of the word counting program in order to test a shm kv store. I needed benchmark that created a lot of cross thread concurrent accesses to keys and I found a blog about this test. My version has serious constraints though, you have to create a shared memory map with enough space to hold all of the keys beforehand, as it doesn't resize the shm kv map as it runs.
This is the source for it:
https://github.com/raitechnology/raikv/blob/master/test/ctes...
The speedup of the multi-threaded version vs the single-threaded version is about linear. The single threaded version uses 2 threads, one to read stdin and one to hash the keys, the 16 threaded version uses one thread to read, 16 to hash.
$ time ctest -t 1 < ~/data/enwiki-p10p30303
word_frequency_nim
-
Performance comparison: counting words in Python, Go, C++, C, Awk, Forth, Rust
Thanks for doing a nim version! I've been learning nim, and am very much a beginner, so I thought I'd tackle a simple version [0]. I'd appreciate any critiques... I don't know how idiomatic it is.
Honestly, the optimized version you created is kind of opaque; I don't want people to think that that's what "typical" nim looks like.
I'll do a pull request on the project for mine as simple, yours as optimized, if you don't mind.
[0]: https://github.com/csterritt/word_frequency_nim/blob/master/...
What are some alternatives?
countwords - Playing with counting word frequencies (and performance) in various languages.
generate-random-numbers
KindleClippingsTranslator - Czytacz slowek
adix - An Adaptive Index Library for Nim
wordcount - Counting words in different programming languages.
CPython - The Python programming language