Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Const-me
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
78 ms
·
931.
▲
by
Const-me
5y ago
I know it can happen, but I would expect the result to be a couple percepts. OTOH, I did observe up to 20% randomness based on other choices made by optimizer, compiler and linker. In my experience, the main source was different decisions w
932.
▲
by
Const-me
5y ago
On Windows, the best way is often Direct2D https://docs.microsoft.com/en-us/windows/win32/direct2d/dire... On Linux, you have to do that yourself. The best approach depends on requirements and target har
933.
▲
by
Const-me
5y ago
> Memory layout is most definitely important just because memory accesses have such a high latency Indeed, but that’s not what the video is about. They don’t discuss how to implement cache friendly data structures. They tell how small ra
934.
▲
by
Const-me
5y ago
> A bad memory layout can have a huge impact on perf. A simple example is iteration order of a 2d array, where not doing sequential access can result in a ~5x slow down. I know all that stuff, but the presenter doesn’t talk about RAM lay
935.
▲
by
Const-me
5y ago
The guy is unconvincing. I don't believe RAM layout is that important. Of course it can affect perf, but slightly, not by 40%. For instance, Windows has ASLR (address space layout randomization) for security reasons, enabled by default
936.
▲
by
Const-me
5y ago
> Rust can solve it identically to C++ by side stepping the borrow checker Doing that is prohibitively expensive in this particular case. It would require patching a large third-party library who uses Arc for the API: https://
937.
▲
by
Const-me
5y ago
> To be fair, anything you can do in C++ can be done in Rust. Technically, all programming languages are Turing-complete. Practically, various things can affect development cost by a factor of magnitude. The OP acknowledges that, they wr
938.
▲
by
Const-me
5y ago
> No idea if they're a Google Cloud customer though. Even if they are, I have doubts that’s enforceable either. One doesn’t need to reverse engineer an API to consume that API, and it’s hard to find out who did the reverse engineeri
939.
▲
by
Const-me
5y ago
> I was thinking about a fully mutable context shared across threads A quote from the article: “No locks, no mutexes, no syscalls, no shared mutable data here. There are some read-only structures context and unit shared behind an Arc, bu
940.
▲
by
Const-me
5y ago
> How would the GC avoid the atomic lock and cache invalidation across numa boundaries? By not using reference counting. State of the art GCs don’t count references. They usually doing mark and sweep, implementing multiple generations, a
941.
▲
by
Const-me
5y ago
I think that’s only possible if they ban TCP/IP for play store apps, enforce that in the OS kernel (SELinux can probably do), and instead expose the one and only high-level HTTP API for apps.
942.
▲
by
Const-me
5y ago
I’ve looked for 5 minutes there, and found nothing relevant. They don’t even have additional specific TOS for their translate service, the only link from https://policies.google.com/terms/service-specific?hl=en-US unde
943.
▲
by
Const-me
5y ago
> UA rotation is rarely used for legitimate purposes It’s not uncommon for hundreds of users to share a single public IPv4 IP address through an ISP-provided NAT. The same applies to corporate LANs with a single uplink channel. These use
944.
▲
by
Const-me
5y ago
Which part of https://translate.google.com/ web page says the service provided by the page is a free sample of commercially available API?
945.
▲
by
Const-me
5y ago
Visiting a publicly available web page doesn’t create contractual obligation between end users and web server owners. If Google views what telegram doing as abuse, then how it’s different from what end users are doing while interacting with
946.
▲
by
Const-me
5y ago
> An ops table definition or registration macro can do compile time checking If programmers writes that check, yes. Same applies to a unit test. C++ compiler gonna verify that thing automatically, no extra work required, neither initiall
947.
▲
by
Const-me
5y ago
In my country (Montenegro), at least one logistic company supports cash on delivery for physical goods shipped within the country. Specifically, a buyer orders something, a seller ships the package, the logistic company delivers package + p
948.
▲
by
Const-me
5y ago
> Never found that particularly helpful if the code is structured well IMO, all else being equal, errors detectable at compile-time should be detected at compile-time. Following reasons. (1) No matter the circumstances like time pressure
949.
▲
by
Const-me
5y ago
> just a thin and often clunky layer of syntactic sugar on top of it. That sugar does help. C allows adding another function pointer to that structure, but not set that pointer. C++ compiler forces programmers to implement all interface
950.
▲
by
Const-me
5y ago
> because it is lowering it's potential energy. There’s also kinetic energy. The Earth rotates, and we have the Moon. It’s theoretically possible to build a machine which harvests energy from that rotation. Tides are powered by that
951.
▲
by
Const-me
5y ago
> which attempt to hide latency It does exceptionally good job at these attempts. If you think manually managed caches are fun, read [1] for an illustration what amount of efforts is required to sum an array for an architecture where on-
952.
▲
by
Const-me
5y ago
> unless you're doing fun patterns like 'where TComparer : IEqualityComparer<T>,struct` These fun patterns are precisely generic type constraints I mentioned in my comment. I do use them when performance matters, here’s
953.
▲
by
Const-me
5y ago
> But it's not going to be fun compared to a language that has zero cost abstractions C# has them. For instance, interfaces used as generic type constraints are zero cost. Another thing, some C# abstractions are very low cost. Criti
954.
▲
by
Const-me
5y ago
Started 7 years ago, delivered nothing? I don't think they gonna make it.
955.
▲
by
Const-me
5y ago
> a message queue type of service, where the desire was to minimize latency and to have consistent performance over prolonged use. Your requirements are probably similar to this C# queues class: https://github.com/Const-m
956.
▲
by
Const-me
5y ago
> It actually is the same thing that being seen from different perspective Absolutely, but these perspectives aren’t equally useful, it depends on the user and their use case. The real low-level thing reported by Linux is a useful perspe
957.
▲
by
Const-me
5y ago
> LLVM binaries I wouldn’t want LLVM, I like JIT. The binaries are CPU and OS agnostic; sometimes I debug C# code on AMD64 Win10 which then runs on Alpine Linux with ARMv7 and ARM64 CPU. It’s relatively easy to generate code in runtime,
958.
▲
by
Const-me
5y ago
I don’t disagree, but some other stuff often used in system and low-level programming is easier to use from C#: stackalloc and unmanaged heap, spans, SIMD intrinsics from System.Runtime.Intrinsics namespace, scalar intrinsics from BinaryPri
959.
▲
by
Const-me
5y ago
> So there is pattern matches, immutability, traits, and so on, in Rust style, but no lifetimes and related syntax. I think C# fits the bill. Pattern matching: https://docs.microsoft.com/en-us/dotnet/csharp/
960.
▲
by
Const-me
5y ago
> that should be practically zero-cost on x86 It’s practically zero cost when uncontested. When contested, the instructions with that `lock` prefix are concurrently accessing a single cache line from multiple cores at the same time. Thes
More ›