←back to thread

283 points ghuntley | 5 comments | | HN request time: 0.617s | source
1. pixelpoet ◴[] No.45135241[source]
> A few notes for the "um actually" haters commenting on Hacker News

Stay classy; any criticism is of course "hating", right?

The fact that your title is clickbaity and your results suspect should encourage you to get the most accurate picture, not shoot the messenger.

replies(2): >>45136013 #>>45136646 #
2. unwind ◴[] No.45136013[source]
I can bite (softly) on part of that, since there is C code in the post. :)

This:

    size_t count = 0;
    /// ... code to actually count elided ...
    printf("Found %ld 10s\n", count);
is wrong, since `count` has type `size_t` you should print it using `%zu` which is the dedicated purpose-built formatting code for `size_t` values. Also passing an unsigned value to `%d` which is for (signed) `int` is wrong, too.

The (C17 draft) standard says "If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined" so this is not intended as pointless language-lawyering, it's just that it can be important to get silly details like this right in C.

3. menaerus ◴[] No.45136646[source]
People should just ignore such low-quality material and stop feeding the troll. Information found in both the first and second part of "Memory is slow, disk is fast" series is wrong on so many levels that it isn't worth correcting or commenting. It is obviously written with the help of the AI without actually fact-checking at all and all under the impression that the author is worthwhile which he isn't.

Just look at this bs:

> Early x86 processors took a few clocks to execute most instructions, modern processors have been able parallelize to where they can actually execute 2 instructions every clock.

replies(1): >>45136744 #
4. gpderetta ◴[] No.45136744[source]
wait, P5 is not modern any more ? :D
replies(1): >>45147885 #
5. menaerus ◴[] No.45147885{3}[source]
Writing software would have been a much easier place if we had CPUs like that today :D