Viewing profile — vitalyd
vitalyd
HN member- Joined
- Tue, May 12, 2015, 2:36 PM UTC
- HN karma
- 80
- Public activity
- 113 items
- HN profile
- View on Hacker News ↗
About vitalyd
No profile information was provided.
Recent public activity
-
comment
Comment #21843587
It seems you’ve already made up your mind and nothing anyone says will change that :). The volatile I mentioned isn’t due to concurrency of userspace threads, but to avoid the opti…
-
comment
Comment #21841228
Lest someone gets the wrong idea, Rust makes _mutable_ globals painful to work with; readonly is fine. As for hardware DMA’able memory, it’s true that it adds friction to work with…
-
comment
Comment #16705830
Sorry, that was my mistake - it has pre-write barriers for SATB but not actual read barriers. However, ZGC will have read barriers and if Shenandoah ever gets integrated into Hotsp…
-
comment
Comment #16702929
G1 has read barriers for SATB marking. Whether a read barrier is used or not is a function of which GC is used so can’t really say “Hotspot doesn’t use read barriers”.
-
comment
Comment #16702902
No, it’s sadly true. EA may scalarize the allocation but this optimization falls apart very easily in Hotspot.
-
comment
Comment #16702890
.NET doesn’t have interior pointer. Any `ref` must be on the stack and that’s tracked in the stackmap. You cannot have a ref as a field.
-
comment
Comment #14566381
That's all true, but I think we're talking past each other a bit. My point isn't about what mechanics would be used or the type of memory order specified (that's the irrelevant par…
-
comment
Comment #14565374
Note that I didn't mention anything about it being automatic. It's merely a case of being more explicit about what may happen to the value. Sequential consistency is irrelevant to …
-
comment
Comment #14563865
> Concurrency is not special here I beg to differ. Concurrency comes with its own bag of hazards, as I mentioned in my reply to burntsushi. Comparing its invariants with Vec's leng…
-
comment
Comment #14563834
Only because I've had several people ask me how Rust handles memory ordering after they've learned of Sync. Sync documentation focuses very narrowly on there being no data races ag…
-
comment
Comment #14559421
> I guess I don't see the difference At a high and general level, yeah, it's all "unsafe". But, most conversations about unsafe don't talk about this aspect. So while what you say …
-
comment
Comment #14559169
I suppose my point was that auto-deriving Sync may not have been such a great idea :). I understand the rationale for it but it does open up traps for people to fall into.
-
comment
Comment #14559163
Yeah, I understand and what I expected to be the answer. My point is that when people talk about Sync not allowing data races, there's the asterisk attached to that statement. That…
-
comment
Comment #14557526
I think it's fair to question a type being auto-derived to be Sync if only individual fields are Sync. It may lead to improper sharing of a reference to this value where threadsafe…
-
comment
Comment #14557511
Right, but my question isn't about T itself, but rather how it's published to another thread. The example I gave is of a plain struct with no atomics or any other synchronization t…
-
comment
Comment #14557433
Ok, that's what I figured - thanks. That does bring up the question, though, whether it's correct to say that a Sync type doesn't permit data races. In the example I gave above, pu…
-
comment
Comment #14556806
Somewhat tangential, but what ensures memory visibility in Rust? Say I allocate a struct (heap or stack), and then pass an immutable reference to a function that takes T: Sync. Ass…
-
comment
Comment #14556792
> I may have misunderstood Ralf's bug. Is it really the case that MutexGuard was seen as Sync if T was Send, rather that Sync? Wouldn't that be a bigger problem than just the case …
-
comment
Comment #12059384
Sure, but that space isn't just Java anymore anyway. Also, what's an (non-toy) environment where developer productivity and safety/correctness don't matter? I always find that stat…
-
comment
Comment #12056162
It all depends on what time scale we're talking about since "very fast" is relative. High performance native systems don't use (in any meaningful manner) naive malloc/free, so that…
-
comment
Comment #12055875
You should've made it explicit then that you're referring to slow HFT -- the post I was replying to drew no such distinction apart from saying the "extreme end" uses FPGAs. Obvious…
-
comment
Comment #12055292
Yes, Azul has a similar feature (ReadyNow). This is nontrivial because lots of optimizations depend on class load ordering and runtime profile information.
-
comment
Comment #12054964
Tiered JITs are meant to allow slower and more aggressive optimizations to be done on truly hot code. However, you're right in that they still cannot spend as much time or resource…
-
comment
Comment #12054943
Devirtualization is mostly an issue for Java since everything is virtual by default and the language doesn't have support for compile time monomorphization. While C++ code does use…
-
comment
Comment #12054933
The fantastic standard library mostly goes away because it allocates. It's possible to write Java code that doesn't allocate in steady state, but the coding style becomes terrible …