Angehefteter Tweet
elnardu
913 posts


Поскольку жизнь продолжается, я сел и написал вам очередную сказку на ночь о том, как я графики с метриками фиксил. Она не страшная. В ней я опять ругаю Rust (не сильно), а C++ молодец (нет)
github.com/Nekrolm/ubbook…
Русский

@cmgriffing (I also think that web would benefit from a bit of premature optimization, but that is beside the point)
English

@cmgriffing You are also assuming that there are readability issues (without measuring that as well)
English

@elnardu The 40-50% perf hit is for just the loop alone. If the loop is actually your bottleneck, then by all means fix it. But in most cases, the readability hit is not worth the gains you seem to care about.
English

@cmgriffing In general, if you want perf in js, you shouldn't rely on JIT at all. Chrome's, FF's, and Safari's JITs are all different and have different behaviors. Your app will have a lot better perf if you just stick to simple things and avoid all of that FP like JS entirely.
English

@cmgriffing I use this pattern all the time when writing jsx and it works quite well. And again, I don't think that any readability benefit is worth 40-50% perf degradation (esp in render functions that get called all the time)
English

@cmgriffing I don't think this is any less readable. (Or not readable enough to warrant a 40% to 50% perf hit)

English

@elnardu Just try it. It won't work. React JSX does not support that syntax inline. You can do other magic but then you move the context. Colocating the context of the loop with the rest of your JSX is pretty good for readability.
English

@elnardu This is fine, but it is not usable in a React render's JSX. That was the original use case.
English

@SuperFashi1 @_JohnHammond Aren't they stored in the keychain on macos and ios? Not exactly plaintext
English

@_JohnHammond this is usually true for *all* devices that can connect to wifi😐
English

Fun fact: Windows stores Wi-Fi passwords in plaintext! You can extract passwords with netsh.exe, but that's a child process that might be observed -- we can improve our tradecraft to extract Wi-Fi passwords with native Win32 API functions... in Rust 😎😈youtu.be/auGJJOfmrMM

YouTube

English







