In reply to nicol biden. Python implements a *lot* of Python using strings and dictionaries. Having stri...
https://lemire.me/blog/2017/07/07/are-your-strings-immutable/#comment-663800
In reply to Matteo Mei. We are measuring the speed of a strided copy, as explained...
https://lemire.me/blog/2023/12/12/measuring-the-size-of-the-cache-line-empirically/#comment-663761
I don't understand you C code. For every possible stride you do 10 runs to compute min max and average times. Each run is a repetition of 5 * slice invocations to the stride_copy function and yie...
https://lemire.me/blog/2023/12/12/measuring-the-size-of-the-cache-line-empirically/#comment-663755
One could argue that software engineering is concrete applied work. Yet, it is probably one of the first to be fully automated, when considering systems such as Devin, etc.
It might be interesting to check what happens with 64-bit registers. Writes to 32-bit registers require zero extension as per the architecture so this might create some complications depending on...
Apple Silicon CPU Optimization Guide: > • Paired load operations: These common cracked instructions have two destination registers and are cracked before renaming. However, unless the operands ...
I remember dealing with a memory hazard like this fifteen years ago when using NEON SIMD instructions on an iPhone.
In reply to Daniel Lemire. For a generic library, I guess an hyb...
I like your points, I'd argue one though. > "That’s one reason why employers ask for relevant experience: they seek expertise they can rely on." That's true as long as you're outside. Then they...
https://lemire.me/blog/2024/04/21/how-do-you-recognize-an-expert/#comment-663317
In reply to Cly. The binary GCD still has, effectively, logarith...
Also regarding improving libc++, it's beeing discussed: https://github.com/llvm/llvm-project/pull/77747 but there are some concerns about the binary gcd performing worse on some inputs, especiall...
In reply to Florian. Please see https://www.newscientist.com/article/mg26134743-000-sper...
https://lemire.me/blog/2024/04/13/science-and-technology-links-april-13-2024/#comment-663184
Is there any specific source you can link to for reference on the sperm count info you mention?
https://lemire.me/blog/2024/04/13/science-and-technology-links-april-13-2024/#comment-663177
In reply to -.-. Urgh, messed up formatting - try https://pastebin.com/fW3RAzdr ...
https://lemire.me/blog/2024/04/19/how-quickly-can-you-break-a-long-string-into-lines/#comment-663168
You might be able to get a bit more throughput by limiting the size range of copies, ignoring overshoot, instead of arbitrary sized memcpy/memmove. Example: template __attribute__((target("avx2")...
https://lemire.me/blog/2024/04/19/how-quickly-can-you-break-a-long-string-into-lines/#comment-663167
You can obtain an even faster gcd (2 digit % improvement for me) with a small trick to avoid instruction dependency: template int_type binary_gcd_noswap(int_type u, int_type v) { if ((u == 0) || ...
In reply to Daniel Lemire. Sorry for my ignorance. I should have used fast_float.
https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/#comment-663131
In reply to Yaqi Wang. If you want to parse strings like "6.", you can use a library such as fast_fl...
https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/#comment-663130
I should have added that c++ input stream seems working ok with this. I attached a small code snippet here: std::istringstream convert("6."); double val; while (convert >> val) { if (std::isinf(v...
https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/#comment-663129
In reply to Daniel Lemire. Sorry for not being clear. I mean using "6." as a literal in an expressio...
https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/#comment-663128
In reply to Yaqi Wang. What do you mean by odd? It is not valid JSON. In JavaScript, try...
JS...https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/#comment-663126
libstdc++ (used by GCC) implements std::gcd() with Stein's algorithm, so it's no surprise it's about as fast as your implementation of the same algorithm. libc++ (used by Clang) implements std::g...
In reply to Daniel Lemire. Thanks for this info. Feel a little odd because "6." is valid in c++.
https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/#comment-663124
A more permanent link to the paper of mine you referenced above How To Read Mathematics is: “How to Read Mathematics” by Shai Simonson and Fernando Gouvea is: https://www.researchgate.net/pub...
https://lemire.me/blog/2005/03/10/how-to-read-mathematics/#comment-663081
In reply to Yaqi. It should: "A fraction part is a decimal point followed by one or more digits." Se...
https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/#comment-662998
Is the parser supposed to give an error i.e. return null pointer for a string like "6."?
https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/#comment-662997
In reply to Daniel Lemire. As of 04/15/2024, your blog is not blocked in China :)
https://lemire.me/blog/2018/02/21/iterating-over-set-bits-quickly/#comment-662951
In reply to Andrew Johnston. This blog post was about Crow. You insisted that I compa...
https://lemire.me/blog/2024/04/06/c-web-app-with-crow-early-scalability-results/#comment-662841
In reply to Daniel Lemire. it seems strange to me that you won't just use the spawn.j...
https://lemire.me/blog/2024/04/06/c-web-app-with-crow-early-scalability-results/#comment-662835
In reply to Daniel Lemire. no worries. thanks for letting me know. interested to see ...
https://lemire.me/blog/2024/04/06/c-web-app-with-crow-early-scalability-results/#comment-662821
In reply to Andrew Johnston. Thanks for correcting me Andrew. Note that my blog post ...
https://lemire.me/blog/2024/04/06/c-web-app-with-crow-early-scalability-results/#comment-662820
In reply to Daniel Lemire. Andrew Johnston: Jarred got in touch and told me that you ...
https://lemire.me/blog/2024/04/06/c-web-app-with-crow-early-scalability-results/#comment-662819
Please add some syntax highlighting to the code.
> If, on your system, network IO happens on a single thread, I suggest you file a bug report with Bun, as it is unexpected. sorry daniel, but this just isn't correct. bun networking - like all th...
https://lemire.me/blog/2024/04/06/c-web-app-with-crow-early-scalability-results/#comment-662817
In reply to Andrew Johnston. Crow server is not optimal for something built with ...
https://lemire.me/blog/2024/04/06/c-web-app-with-crow-early-scalability-results/#comment-662811
hi daniel, sorry to be a pain but this is not correct. "I have verified that the bun server is multi-threaded. The command ps huH p processid |wc -l reveals that it uses about 10 threads." if you...
https://lemire.me/blog/2024/04/06/c-web-app-with-crow-early-scalability-results/#comment-662780
Just thought you might like to know that CMU Common Lisp (cmucl.org) implemented this idea in Dec 1997, by Douglas Crosher. The commit log just says it's doing a multiply instead of a remainder o...
https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/#comment-662731
In reply to Michael P. I do not recommend eating Oreo cookies for health reasons.
https://lemire.me/blog/2024/03/31/science-and-technology-links-march-31-2024/#comment-662561
On item 34, note that the study involved a single subject who is a (statistically rare) "lean mass hyper-responder" on a keto diet that makes his baseline LDL be sky-high, and the effect might be...
https://lemire.me/blog/2024/03/31/science-and-technology-links-march-31-2024/#comment-662530
Before C++23, there is also this so-called YCombinator pattern that I mentioned in a Conference Report: https://www.sandordargo.com/blog/2021/12/15/trip-report-cppp2021#three-catchy-ideas I'm not...
https://lemire.me/blog/2024/03/22/passing-recursive-c-lambdas-as-function-pointers/#comment-662289