Hacker Newsnew | past | comments | ask | show | jobs | submit | pjscott's commentslogin

It's a tale as old as schlock journalism: an article seems interesting... until it talks about something you actually know about personally, at which point it suddenly starts saying obvious nonsense.

My experience is that very few people understand what I am saying if I really explain things. It is usually better to say obvious nonsense that gets people work in the same direction. I most masscommunication is meaningless until you find the meaning yourself, there are some rather wonderful educators that prove I am wrong. I can only think of one that I have met, and he spent 50% of his time talking about "unrelated" topics. He died, teaching to the end.

I'm not too familiar with the JVM so perhaps I'm missing something here: how would that help? The file is tiny, just a few bytes, so I'd expect the main slowdown to come from system call overhead. With non-mmap file I/O you've got the open/read/close trio, and only one read(2) should be needed, so that's three expensive trips into kernel space. With mmap, you've got open/stat/mmap/munmap/close.

Memory-mapped I/O can be great in some circumstances, but a one-time read of a small file is one of the canonical examples for when it isn't worth the hassle and setup/teardown overhead.


As with all the ahead-of-time compiled languages that I checked, the answer is that it generates non-SIMD code for the hot loop. The assembly code I see in godbolt.org isn't bad at all; the compiler just didn't do anything super clever.


The common element is that they're written with the most obvious version of the code, while the ones in the faster bucket are either explicitly vectorized or written in non-obvious ways to help the compiler auto-vectorize. For example, consider the Objective C version of the loop in leibniz.m:

  for (long i = 2; i <= rounds + 2; i++) {
      x *= -1.0;
      pi += x / (2.0 * i - 1.0);
  }
With my older version of Clang, the resulting assembly at -O3 isn't vectorized. Now look at the C version in leibniz.c:

  rounds += 2u; // do this outside the loop
  for (unsigned i=2u; i < rounds; ++i) // use ++i instead of i++
  {
      double x = -1.0 + 2.0 * (i & 0x1); // allows vectorization
      pi += (x / (2u * i - 1u)); // double / unsigned = double
  }
This produces vectorized code when I compile it. When I replace the Objective C loop with that code, the compiler also produces vectorized code.

You see something similar in the other kings-of-speed languages. Zig? It's the C code ported directly to a different syntax. D? Exact same. Fortran 90? Slightly different, but still obviously written with compiler vectorization in mind.

(For what it's worth, the trunk version of Clang is able to auto-vectorize either version of the loop without help.)


The delta there is because the Rust 1.92 version uses the straightforward iterative code and the 1.94-nightly version explicitly uses std::simd vectorization. Compare the source code:

https://github.com/niklas-heer/speed-comparison/blob/master/...

https://github.com/niklas-heer/speed-comparison/blob/master/...


They have very limited power these days. They advise the House of Commons, as more or less a hereditary think tank. They can delay the passage of bills, though this has been limited to a maximum delay of one year since 1949 (less for some types of bills) and there are some checks on this ability. They have a few other things they can do that are (IMO) too boring to warrant much thought unless you're a member of parliament.

The idea of a House of Lords does strike me as a bit odd, but it's not really the big deal it used to be.


They do, technically, allow JIT. You need a very hard-to-obtain entitlement that lets you turn writable pages into executable read-only pages, and good luck getting that entitlement if (for some reason) your name isn’t “mobilesafari”, but the capability exists.


When you say it's "hard" to obtain--is it possible to obtain if you aren't Apple? Does Apple ever provide it to third party developers, or is there even a path to requesting it?


Yes.


Source? Is there any non-Apple app that has this entitlement?


If your app happens to be a browser that's only usable in the EU then:

https://developer.apple.com/documentation/browserenginekit/p...


I believe the Delta emulator has JIT support, but possibly only when installed as a developer.


As far as I can tell, you need to connect your phone to a PC running software which enables JIT by exploiting a feature intended for remote debugging. https://faq.altstore.io/altstore-classic/enabling-jit


It may comfort you to hear that the Starlink satellites are tiny in comparison to the vastness of their orbit – the visualization makes them appear larger than they are, so you can see them clearly – and that they’re low enough that they’ll naturally de-orbit and burn up in the atmosphere after about 15 years even without using their maneuvering thrusters.

They’re providing worldwide rural broadband, and according to the FAA they’re doing so in a way that’s careful and responsible about space debris and collision avoidance. Is disgust truly warranted in this case?


I’m also introverted, and I also found this article overwhelming – if I tried to do it all at once, which seems so laughably unrealistic for me that I just wouldn’t try. Instead, probably the best way to read this is as something to approach gradually. Try just one thing on the list, or two if you’re feeling ambitious. Go for a delta that you can manage. And see if it’s working for you, because often the advice that works wonders for one person completely falls flat for another.

(On a slightly funny personal note, the thing that helped me most with social skills was watching the first few seasons of Buffy the Vampire Slayer in my first year of college. The actors emoted so clearly that even I could understand what feelings they were trying to convey, and that’s how I learned to do body language and appropriate vocal tones. This took me from unapproachable to merely awkward, a huge step up in the world.)


The rationalist movement has been talking about this since the beginning, and has consistently come to the conclusion that of course the thing to do is admit to our own fallibility and try to do the best we can with our profound limitations.

(You didn’t explicitly say otherwise, so if my exasperation is misdirected then you have my apology in advance.)


No need to apologize, I am unashamedly an opponent of rationalism and I hold the entire movement and every one like it in history in withering contempt.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: