George

1.1K posts

George banner
George

George

@geocucu

C btw.

Katılım Mart 2024
52 Takip Edilen773 Takipçiler
George
George@geocucu·
Ahhh modernity
George tweet media
English
0
0
3
383
George
George@geocucu·
Github if IBM designed it in the 60s
George tweet media
English
3
19
535
15.6K
svgmzr
svgmzr@svgmzr·
@TonyClimate How exactly this knowledge will be useful for writing something like Twitter? It runs on JVM
English
1
0
4
2.3K
Tony Heller 🇺🇸 🇯🇵
I would guess that most junior developers don't know the difference between processor registers, static ram and DRAM, and don't know anything about CPU cache hierarchies. They are used to having huge amounts of compute power to hide their incompetence and lack of education.
English
10
4
109
29.5K
Silicon Mania
Silicon Mania@siliconmania·
Shark Tank is dead. no one has 2 hours to watch a fake, cinematic, scripted drama. we just fixed that. introducing... The Buzzer 🔴 1 founder. 1 investor. 5-minutes speed date. every time the set turns red, either one can reject the other and get a new match (yes... founders can reject investors too LOL) if they both survive the 5 minutes, it's a match. and they get a private second date. it's entertaining. it's educational. and it's actually very fun to watch. this is the new Shark Tank. and it's called The Buzzer 🔴 enjoy! 🍿 (and shoutout to CUT for the inspiration, and to @compai for sponsoring this episode 💚)
English
132
61
1.1K
168.2K
George
George@geocucu·
@slimjimmy You don't really need to read the whole paper or even part of it to not be barking when it comes to memory. 80% of memory abuses can be spotted instantly without any analysis or even any thinking whatsoever (Source: I made it up)
English
1
0
1
501
George
George@geocucu·
Trillion dollar AI idea: it filters out certain faces from my Internet experience
George tweet media
English
0
0
10
563
George
George@geocucu·
@ludwigABAP It grows on you 15 years in (not really, but I want to think positive thoughts here)
English
0
0
1
80
ludwig
ludwig@ludwigABAP·
@geocucu what a disgusting language
English
2
0
32
3.1K
George
George@geocucu·
Just avin a giggle at this point
George tweet media
English
4
0
33
5.4K
George
George@geocucu·
George tweet media
ZXX
3
6
74
2K
George
George@geocucu·
@Philipp02536795 And what do you use the accumulator register for? That's right - everything
English
1
0
2
26
🇦🇹Philipp
🇦🇹Philipp@Philipp02536795·
@geocucu we have: >accumulator register >base register >counter register >data register >stack pointer >base pointer >source index >destination index we add: >register 8 >register 9 >register 10 >register 11 >register 12 >register 13 >register 14 >register 15
Dansk
2
0
4
59
George
George@geocucu·
"Data"... Yes "Code"... Sure "Stack"... That makes sense "Extra"?... Uhuh 5 minutes later... "It's a new generation, we need extra extra registers! We already have an E in there, how about F and G?" (I've finally looked up what F and G stand for in FS and GS: nothing)
English
2
0
6
555
George
George@geocucu·
Not massively surprising considering the more well known "Extended" and... "Register" (Extended Extended)
English
0
0
1
134
George
George@geocucu·
Signed up to the other site recently...
George tweet media
English
0
0
2
147
George
George@geocucu·
Consider the gravity of the situation
George tweet media
English
0
0
0
93
Mike Qin
Mike Qin@__broken_mike·
@geocucu map<string, map<string, string>> solves everything!🤣🤣🤣
English
2
0
14
2.3K
George
George@geocucu·
His details might be incoherent slop, but I've seen some... abuse in "enterprise c++" Strings that could've been enums. Maps keyed by strings that could have been enums. Constructing a std::string from a long literal just to get the length of the string literal. ...
Victoria@VictoriqueM

Hidden heap allocations are Language-dependent and often flat-out false though, string literals live in the binary's read-only data section, not the heap. C++ has SSO (short string optimization) keeping strings under ~15–23 chars inline on the stack. AND Rust &str is a pointer+length with zero allocation. Go strings are (ptr, len) headers and can be stack-allocated via escape analysis, plus it's not really "hidden", any profiler or allocation tracker surfaces string allocs immediately. as for Copy-on-write behavior, a relic of the past, C++11 explicitly banned CoW for std::string because of threading issues. Rust doesn't use CoW by default. Go strings are immutable and shared via pointer+length. and as far as i remember, Swift uses CoW and it's considered a feature, not a cost. the entire point of CoW is that you "don't copy until you mutate". your point of "CoW makes CPU work 2x" is the opposite of what CoW does.... O(n²) concatenation is a Programmer error, not a string problem, i can't see how it is. s = s + x in a loop is quadratic in every language i can think of, which is why every language ships StringBuilder / strings.Builder / String::push_str / bytes.Buffer. Cache-unfriendly memory access seems backwards to me, a string is a contiguous byte array; it's pretty much verified cache-friendly access: sequential, prefetchable, SIMD-able. What's truly cache-unfriendly is shit like linked lists of chars or ropes. std::string, Go string, Rust String, and Java String (with compact strings) are all contiguous. Encoding overhead (UTF-8/16): well, If you need to represent text, you need an encoding, using bytes doesn't exactly fix that, you will just be re-inventing the wheel (reimplement indexing and validation). UTF-8 ASCII is 1 byte/char, identical to ASCII, The only "overhead" i can see appears for non-ASCII, and refusing to handle non-ASCII isn't a performance, it's just wrong. O(n) compare & hash is Information-theoretic lower bound at best not an implementation flaw, You cannot, in general, determine equality of n bytes in fewer than O(n) operations... Can't hash n bytes in less than O(n). "Primitive byte arrays" have the identical bound, they're the same bytes. Real string implementations also layer optimizations on top: length check first ((O(1) rejection), SIMD comparison, etc...) GC/allocator churn is again, a mem-man issue, not a string one, if you have an actual bottleneck, the fix is interning, arena/pool allocators, or buffer reuse, not "stop using strings", that is silly, and Several of those techniques are already built into string runtimes: Java's string pool, Go's constant folding, Python's short-string interning, etc... and FINALLY, "use primitive buffers, bytes & arrays." Go's string is literally struct { ptr *byte; len int }. Rust's String is Vec plus a UTF-8 invariant. Java 9+ stores strings as byte[]. You're already using byte arrays... Now i dunno what lang you targeted this at, but it seems misinformation at best. did i just get rage-baited?

English
6
2
105
49.1K