Junior Dev Discovers Performance Benchmarks, Demands Rewrite
Why is this Juniors meme funny?
Level 1: Graphs vs Reality
Imagine a kid sees an advertisement for a new toy car that claims to be the "fastest car ever". The ad even shows a chart where this new toy car zooms slightly faster than all the other toy cars in a straight line race. Now the kid is super excited. They run to their parents and say, "We should throw away all my old toy cars and only play with this new fast car! Look at this graph from the ad – it proves it's the best!" The kid is completely convinced that this new toy will make playtime so much better because of that speed.
The parents smile because they know something the kid doesn’t. Yes, the new toy car might be a bit faster on a very smooth track, but in the living room where the kid actually plays, there are rugs, furniture, and turns. All those things slow every toy car down, so the tiny speed advantage might not even be noticeable. Also, the kid’s current toys are working fine and are fun. If they threw them all away to get a new set of toys, it would cost a lot and probably make a big mess – and in the end, the kid might not actually play any differently. Plus, next week there might be another ad for an even "faster" toy, and the kid could suddenly change their mind about what's best.
In this story, the kid is like the junior developer who got excited by a graph showing Zig’s speed, and the parents are like the senior developers who have the practical wisdom. The kid focuses on the shiny graph (just like the junior focuses on the benchmark chart) without understanding the real-world complexity. The parents know that making a huge change (throwing out all old toys or rewriting the whole code) based on one factor might cause more trouble than it's worth. The humor and the point of the meme come from that difference in perspective: the childlike excitement over a small improvement versus the adult understanding that real life is more complicated. It’s funny because we’ve all seen or experienced that kind of situation – whether it’s a kid with a toy, or a newbie at work with a graph – where someone gets carried away with an idea that needs a bit more reality-check.
Level 2: Shiny New Language Syndrome
Let’s break down what’s happening in this meme in simpler terms. We have a junior developer (a newcomer to the team, relatively less experienced) who has become very excited about a programming language called Zig. Zig is a newer programming language that is designed to be very fast and efficient (kind of like the classic language C, but more modern). The junior found some test results – basically a performance comparison – showing how fast Zig can run a certain task compared to other languages. This type of test is called a microbenchmark because it measures a very small, specific operation (in this case, running 1 billion nested loop iterations) rather than a whole real-world program.
In the picture, there are two charts side by side, each titled "1 Billion nested loop iterations". Each chart lists various programming languages and how long they took to complete that huge number of loop operations. For example, on one chart you see languages like C, Rust, Java, Kotlin, Go, JavaScript, PHP, Python, etc., each with a time (C was under 0.50 seconds, Python was around 74 seconds on that chart – so Python was way slower for this task). On the other chart, you see Zig at the top taking 0.5105 seconds, then Rust at 0.5135s, then C at 0.5188s, and so on, and Python at the bottom around 31.589s. The exact numbers and differences aren’t super important, but the key point is: compiled languages (like C, Zig, Rust, Fortran, etc.) all did the task in roughly half a second, whereas interpreted languages (like Python, Ruby) took tens of seconds to do the same thing. Zig was a hair faster than the others on that particular test, which is what got the junior developer so hyped.
Now, the junior developer is coming to the senior developers saying, essentially, "Look at these graphs, Zig is amazingly fast! We should rewrite our entire codebase using Zig to get these performance benefits." This is where the humor kicks in for people with more experience. There are a few concepts here:
Performance Optimization: Making software run faster or more efficiently. It’s generally a good thing, but it should be done where it matters. A famous saying is "premature optimization is the root of all evil," which means you shouldn’t go making things faster before you even know if that part of the code needs speed improvement. The junior in this meme is eager to optimize everything by using Zig, without establishing that the current system is slow in the first place.
Microbenchmark: We touched on this – it’s a very small, specific test of performance. The one shown is about loops. Microbenchmarks are useful for understanding certain properties (like how fast a language can run simple arithmetic operations), but they don’t always translate to real-world improvements in a complex application. It’s a bit like comparing cars by seeing how fast they can go on an empty straight road. Sure, that tells you something about the car’s engine, but in a real city with traffic, red lights, and turns, that top speed might not matter much.
Language Evangelism: This is when someone just won’t stop talking about how great their favorite programming language is, sometimes ignoring its downsides or the suitability for the task. They push it for every problem. Here, the junior has become a Zig evangelist, essentially campaigning for Zig to replace whatever language the team is currently using (be it Java, Python, etc.). It’s called "Language Wars" when communities argue about which language is best. In tech culture, it’s common (and kind of funny) how people can get very tribal about their languages (like Vim vs Emacs, or tabs vs spaces, it becomes almost like sports teams loyalty).
Not Invented Here Syndrome: This term refers to a tendency to distrust or undervalue solutions that come from outside your own team or that were made by someone else. In practice, it often means people decide to build something themselves instead of using an existing solution, or, as in this case, rewrite something just because they didn’t originally make it. The junior dev didn’t create the current codebase and maybe doesn’t like its language or structure, so they suggest a total rewrite. It’s like saying "I want to throw out the old way (because it’s not mine or not trendy) and do it my way with this new tool." Experienced devs are wary of this because the existing system, while not perfect, works and has a lot of knowledge baked into it. Starting over means you lose a lot of that.
Tech Debt (Technical Debt): Think of this like taking shortcuts in code that you plan to fix later. Over time, these shortcuts or older decisions pile up and make the code harder to work with – that’s the "debt" you owe, and eventually you have to pay it back by cleaning up the code. A junior might see rewriting in Zig as a way to escape tech debt: "Ugh, this old code is messy, let’s just start fresh with new code!" However, throwing everything away can be like paying off debt by burning down your house – an extreme measure that might not end well. Often it’s better to pay off tech debt incrementally (refactoring parts of the system one by one).
So, in a typical scenario: the team’s software is probably working okay, maybe with some slow parts or messy parts. A junior comes in with these benchmarking results and earnestly thinks, "If Zig is that fast doing loops, imagine how fast our product will be if it’s all in Zig!" They imagine something like a 100x speedup everywhere – which is unrealistic outside of those specific loop operations. The senior developers have likely seen similar situations and have to explain that rewriting everything is usually a bad idea unless absolutely necessary. The time it would take, the new bugs it would create, and the risk of failure are huge costs. Besides, if there are performance issues in the current system, there are usually simpler fixes: maybe optimize the slow function, add better algorithms, upgrade hardware, or at most rewrite just a small module in a faster language (rather than the whole thing).
The meme uses a Wojak cartoon style for the junior developer character (the drawn face with a somewhat intense expression). This is a common meme drawing to represent certain stereotyped personalities – here likely the overzealous new guy. The speech bubble "If you would please consult the graphs" is drawn to show how serious and confident he is in those charts. It’s funny because it’s an overly formal way for a junior to talk to seniors, and it implies a kind of know-it-all tone backed by a graph they might not fully understand.
In summary, for someone newer (like a real junior developer or a student), the lesson or humor is: don’t jump to adopt a new programming language or rewrite everything just because of one performance chart. You have to consider whether the new thing really fits your needs, and whether the benefits outweigh the very high cost and risk of rebuilding from scratch. Enthusiasm is great – it drives learning and improvement – but seasoned developers temper that with caution and a big-picture view. The junior in the meme has the enthusiasm without the caution (yet), and that contrast is what makes the situation comical to those who have been around long enough to see how such proposals usually end up.
Level 3: Rewrite and Wrong
This meme is poking fun at a classic scenario in software teams: a junior developer discovers a new technology (in this case, the Zig language) and becomes convinced that it’s the silver bullet to all the project's problems. The junior marches into your office, armed with a colorful benchmark chart, and boldly suggests rewriting the entire codebase in Zig because, “Look how fast Zig runs loops!” The humor for seasoned developers comes from how familiar and misguided this situation is. We've seen this movie before – just with different programming languages as the flavor of the month. One year it’s “let’s rebuild everything in Node.js, it’s so fast for JavaScript!”, the next it’s “we must switch to Go, Google did and it's lightning!”, then “how about Rust for safety and speed?”, and now here we are with “Zig will solve all our problems!” The faces and names change, but the tune remains the same.
"If you would please consult the graphs."
That polite, formal line in the speech bubble is the junior dev trying to add weight to their argument. It’s as if the graph is irrefutable evidence that the current codebase is obsolete. The junior is effectively saying, “the data speaks for itself, who can argue with these numbers?” It’s both hilarious and endearing because of the overconfidence in a tiny microbenchmark. This kind of graph-based argument is common among less experienced engineers who might not yet see the bigger picture. Experienced folks know that benchmarks can be very context-specific or even biased. For instance, maybe that graph was produced by someone in the Zig community to show Zig in the best light. Notice how Zig’s time is basically the same as Rust and C (within a few thousandths of a second), yet Zig is painted as the "winner". A senior dev might chuckle, thinking: “Sure, Zig is great, but this graph isn’t exactly a night-and-day difference worthy of a total rewrite.”
Proposing a full backend rewrite solely for performance based on a microbenchmark is usually a textbook case of premature optimization and a dash of Not Invented Here syndrome. Why premature? Because nobody has demonstrated that the current system is actually too slow or that language speed is the real issue. It’s like deciding to rebuild your house because you found a type of brick that is slightly stronger – even though your house has stood fine for years. The legendary computer scientist Donald Knuth warned that “premature optimization is the root of all evil.” In software, this means you should not waste time optimizing (or in this case, rewriting in a "faster" language) until you have evidence of where the actual performance problems are. Otherwise, you might spend huge effort for no real gain. The junior here has fallen into the classic trap: focusing on a shiny metric without asking, “Do our users or system actually suffer because of this? Have we profiled our application to see where the slowdown is?”
The Not Invented Here aspect comes from the psychology that often, developers (especially newer ones) prefer solutions they have a hand in creating or that align with what they personally like. The junior wasn't around when the current system (maybe written in Python, Java, etc.) was crafted, so it feels "other" to them. By proposing a rewrite in Zig, they get to put their own stamp on it. It’s new, it's theirs (in idea at least), and it’s exciting. There's a certain allure to throwing out the old and starting fresh – you get to escape all the messy parts of the existing system (which can be frustrating to learn and work with). This is why many companies have cautionary tales of ambitious rewrites that went awry. The code you have might be ugly, but it’s a result of real-world lessons. Rewriting from scratch means throwing away those lessons. As a result, many rewrites end up repeating old bugs in new forms. A cynical senior engineer might quip, “Go ahead, rewrite it in Zig – that way we can reintroduce all the bugs we fixed over the last 5 years and discover some fun new ones too!”
From a practical standpoint, a complete rewrite is extremely costly. It's not just swapping out syntax. You have to reimplement every feature, verify it, migrate data perhaps, retrain the team, redo testing, redeploy infrastructure – the works. All while the old system likely still has to run (because you can’t just stop the business). It’s like trying to replace the engines of an airplane mid-flight. That’s why seniors often respond to these ideas with a big sigh. They know that even if Zig could run something 10% faster, a rewrite might take 1000% more time than just optimizing one or two slow spots in the current system. The tech debt in an old system can often be addressed with targeted fixes or gradual refactoring, rather than burning everything down. The meme exaggerates the junior’s stance to make it funny — in reality, most juniors wouldn’t demand a rewrite on the spot, but they might earnestly suggest it. And many of us have been that junior at some point, naively underestimating the complexity of real software projects.
The junior vs senior dynamic here is the core of the joke. The junior is earnest, data-driven (in a naive way), and seeking to prove themselves. The senior is world-weary, skeptical, and has a long memory of similar fads. There’s a bit of an eye-roll from the senior: “Ah, here we go again, another youngster with a benchmark chart and a dream.” The categories tagged include LanguageWars and LanguageEvangelism, which is exactly what’s happening: the junior has become a Zig evangelist and is essentially declaring war on the current language of the codebase. But to the senior, this zealotry is old hat. It’s not that the senior hates Zig or new languages — they might actually like Zig for certain things — but they’ve learned to be very cautious about grand proclamations like “let’s rewrite everything!” Because usually, after the hype fades, it’s the seniors who will be up at 3 AM fixing the fallout if that big rewrite goes sideways.
In the end, the meme’s humor is a knowing laugh. The phrase “If you would please consult the graphs” could be turned on its head by the senior saying, “If you would please consult reality…” Experienced devs know to balance performance optimization with practicality. Use the right tool for the job, yes, but also don’t jump to conclusions from one graph. The junior in the meme means well — they want the project to use the best technology — but they’re a little over-eager. And the seniors who see this meme laugh, perhaps a bit ruefully, because they remember being in those shoes, and because they know one day that junior will likely face another junior coming into their office with some future language’s graph, making the exact same plea.
Level 4: Pipeline vs Bytecode
At the lowest level of the machine, performance comes down to CPU instructions and how efficiently they run through the processor's pipeline. In these 1 billion nested loop benchmarks, languages like Zig, C, and Rust are all ultimately converted into highly optimized machine code. A well-tuned optimizing compiler will unroll loops, utilize CPU registers, and even vectorize operations if possible. This means that for raw arithmetic loops, Zig and C end up executing a similar tight sequence of instructions with minimal overhead. The differences in their reported times (e.g., Zig: 0.5105s vs C: 0.5188s) are almost trivial – likely within the margin of error or due to tiny differences in how each compiler handles the loop. It's the computing equivalent of two racecars finishing fractions of a second apart after a long race. This is micro-optimization at its finest, measuring things at the nanosecond scale where cache hits, branch prediction, and instruction scheduling make a subtle difference.
Meanwhile, languages like Python and Ruby sit at the bottom of the graph with hugely larger times (dozens of seconds!). This gap arises because they use interpreters or virtual machines, executing many more instructions per loop iteration. Every single loop in Python involves bytecode interpretation, dynamic type checks, and object allocation for integers. The CPU pipeline never gets to chew on a tight loop of simple operations; instead, it’s constantly interrupted by the interpreter's complex dance. There's also the factor of the Global Interpreter Lock (GIL) in CPython, which prevents true multi-core parallelism for a single process – but here it's mostly the per-iteration overhead that hurts. In a nested loop doing effectively nothing, an interpreted language is like an office worker handling one paper at a time with a lot of bureaucratic steps for each, whereas a compiled language is an assembly line machine stamping out results with precision at gigahertz speeds.
Just-In-Time (JIT) compiled languages like Java or JavaScript (Node, Deno, Bun) sit in the middle. A JIT starts by interpreting or using bytecode, but then hot loops get dynamically optimized into machine code on the fly. That’s why Java (0.54s) comes so close to C – its JIT likely identified the hot loop and optimized it almost as well as an ahead-of-time compiler would. The slight difference might be JIT warm-up time or leftover safety checks (like array bounds or type guards) that languages like Rust or C don't pay after compilation. Rust includes some safety (like bound checks on arrays) but those get optimized out or are very cheap; Zig allows you to turn off safety checks entirely in release mode. All these compiled languages are essentially bound by memory bandwidth and the fundamental clock speed of the CPU for such a simple loop.
One thing to note about microbenchmarks: they can be misleading. Compilers sometimes completely eliminate loops if they determine the result isn’t used (dead-code elimination). Good benchmarking practice includes operations to prevent this (like accumulating a result). But even then, these numbers are a narrow view of performance. Real-world applications involve I/O, system calls, memory allocation, cache misses, branching logic and so on, where differences between languages can invert or at least shrink. For example, Fortran shows up as competitive in such purely computational tasks due to decades of compiler optimizations for number-crunching – a nod to its legacy in scientific computing. But in building a web service or a data pipeline, I/O waits and high-level algorithms dominate loop overhead. A language being 5% faster on a trivial loop doesn’t guarantee your whole program will be 5% faster; it could be 0% if the loop isn’t the bottleneck (or even slower overall if the new language lacks certain libraries, forcing you to hand-roll more code).
In summary (at this deep level): the meme’s graph appeals to the inner performance geek – it’s showcasing the raw prowess of languages down to their computational core. Zig sits marginally on top here because it produces extremely lean machine code for this specific task. But this "win" is academically interesting more than practically significant. The real speed differences in software come from higher-level design and systems factors – something our bright-eyed junior might be glossing over in their excitement to chase a new language's theoretical speed crown.
Description
A Wojak-style meme format. The top caption reads, "the junior dev back in your office asking to rewrite the codebase in Zig:". The image shows an angry-looking cartoon man in glasses sitting at a desk and pointing at his computer monitor. The monitor displays two performance benchmark graphs titled "1 Billion nested loop iterations," comparing various programming languages. The graph on the right, which the character is implicitly referencing, shows "Zig" as one of the top performers. A speech bubble from the character says, "If you would please consult the graphs." This meme satirizes the common experience of senior developers encountering a junior colleague who, having discovered a new, highly performant language or technology, zealously advocates for a complete rewrite of a stable system based on a single metric (like loop speed). It humorously highlights the junior developer's lack of awareness regarding the immense business costs, risks, and complexities involved in such a migration, which far outweigh the benefits of a micro-optimization
Comments
131Comment deleted
Yes, the graph shows Zig is 0.03 seconds faster. Now, can you make a graph showing the 18-month migration cost and the resulting downtime?
Sure, kid - just remember that the only loop tighter than Zig’s is the one you’ll be stuck in answering why the rewrite missed every Q4 deadline
Sure, we saved 0.01 seconds on a billion iterations, but the real benchmark is how long it takes to explain to the board why we spent six months rewriting perfectly working code that processes 10,000 records a day
Ah yes, the classic junior move: proposing a complete rewrite in the hot new language because it shaved 80 milliseconds off a synthetic nested loop benchmark. Never mind that our actual bottleneck is the database queries written by the consultant who left three years ago, or that we'd need to rewrite 500K lines of battle-tested code and retrain the entire team. But sure, let's throw away a decade of domain knowledge and bug fixes because Zig is 15% faster at incrementing integers. I'm sure our customers will really appreciate the six-month development freeze while we chase that marginal performance gain we'll never actually realize in production
Great - let’s spend two quarters rewriting in Zig to shave 40 ms off a path where p99 is dominated by ORM N+1 and chatty microservices; Zig might be fast, but procurement isn’t
I’ll approve the Zig rewrite when the microbenchmark includes porting the build system, redoing every FFI client, retraining the team, and passing compliance - the actual enterprise hot path
Junior graphs loop throughput; senior graphs the hiring funnel post-Zig rewrite
Meanwhile Java performing surprisingly well on those graphs Comment deleted
Then we need another graf representing mental health of developers for each language. I want to see how perform Java developers (pretty sure everyone with mental illness). Comment deleted
C devs in an insane asylum Comment deleted
C - depressed C++ - suicidal Java - they don't know what "therapy" is Python - healthy Ruby - schizophrenic Rust - gay Go - megalomaniac Comment deleted
Morbidly obese at the terminal stage cannot be healthy. Comment deleted
Then what language is healthy? I suppose none... Comment deleted
lua/haskell 😄 Comment deleted
Nah, haskell fans are certainly not healthy. I would say they are nazi, cause they care so much about purity 🥴 Comment deleted
Add more languages, guys Comment deleted
JS/TS - STD Comment deleted
I'll have you know I'm neither healthy nor depressed, and I use both C and Python I am gay though. I haven't done a lot of rust. Comment deleted
I code in C/C++ and am very gay so there's a correlation Comment deleted
I'm starting to feel like there is a correlation between being in IT and being gay Comment deleted
true Comment deleted
afaik there were some research that have shown that in IT there are more LGBT than in general population Comment deleted
I certainly can believe it, i have a few assumptions why, but real reasons is a mystery tbh Comment deleted
probably because IT is a field more accessible for marginalized people Comment deleted
maybe 'cause when you can't communicate with people you start communicating with computers Comment deleted
yup Comment deleted
if you're autistic you either become a computer nerd or a train nerd. if you're queer you don't have the option of train nerd because train companies are weirdly conservative (at least in my experience) Comment deleted
say that with the transfems in fedi infodumping about trains Comment deleted
I mean, yeah, but none of them work in rail, no? Comment deleted
Alan Turing's curse Comment deleted
C# - they know what therapy is but refuse to go to it Comment deleted
That's very accurate(im ex C# dev) Comment deleted
I'm currently in .net why did you left? Comment deleted
I got tired of endless abstractions layers and overloaded .NET ecosystem, it's complex but with no benefits. Basically it's a C++ syndrome. Comment deleted
cross of C++ and Java :) MS wanted to ride Enterprise wave and best they came up with C# Comment deleted
Java is almost the same, but with even more bullshit and requirement to learn 5 frameworks before you even begin to code. MS has ridden the enterprise wave, but they ended up in very boring goverment-related and social applications, Java in that sense is slightly better. Comment deleted
and here I disagree .net is very common in finance and gambling domain Comment deleted
yep, that's true, still not sure if i can call those domains interesting Comment deleted
I would not say .net ecosystem is in any way overloaded generally you have 1 way to "do it right" maybe we're talking about different stuff tho Comment deleted
I'm referring to: "almost mandatory Microsoft.DependencyInjection", which is a framework itself, frameworks for message brokers, frameworks for CQRS. frameworks for databases, several not obvious ways to make an http requests, constantly changing "best-practices" with new versions, and so on. There are just so many high level abstractions. Do you have an experience in other languages? Comment deleted
> several ways for http requests they exist however they are outdated > constantly changing best practices I can swear I can't remember anything like that since .NET 5 (that was many years ago) > experience in other languages yeah, although not much I have some experience in java, c++ but not commercial and some commercial experience in TS/JS Comment deleted
Yes, that what i'm referring to. Is RestClient a current best-practice to make a requests? Just curious, i was really surprised when i discovered this. Comment deleted
Yeah im pretty picky, but imo all of those are overloaded. C++ no comments, about java i already said above, TS/JS ecosystem is a mess. Comment deleted
I guess we just have too much of devs ( probably that are not needed) Comment deleted
Maybe? Not sure if that is a reason for it Comment deleted
TS/JS doesn't have an ecosystem, it has a loose collection of unorganized packages that may or may not work well together Comment deleted
which is kinda to be expected of a language that was built on a messy base, standardized only retroactively during the browser wars Comment deleted
So C Comment deleted
well, myeah, kinda. It's less messy I think because it's older and it runs in a different context where you can afford to just introduce breaking changes to improve things somewhat Comment deleted
That's exactly what I'm talking about! Comment deleted
Clearly Rust is winning EDIT also how is Python healthy‽ Comment deleted
I imagine python users like this: Comment deleted
Unironically what my prev (PHP fanatic) teamlead looked like... Comment deleted
python scripters may be sane, but they are still impostors, I mean they are almost on par with checkbox engineers (UE developers) Comment deleted
:( Comment deleted
Good one Comment deleted
The problem is that c/rust/java/go are software engineer. Python are script folks that like just see something run on a PC (sorry a Mac) Comment deleted
tell that to my 800 line php parser IN PYTHON for my 9k line php project fuck you, man. hurtful stereotypes. Comment deleted
You are just using the library, the works from someone else.. your code is slow by definition. Anyway when you get a problem you need to call an engineer. And yes, since you talk about you 800 lines, meaning that is just a script, chatGPT replace that works soon. Comment deleted
1. I don't need it to be fast, but my code completes in less than a second. speed is a non-consideration. 2. I do need it to not parse ALL of the php because what the parser gets isn't technically valid php (in a way that I can't change) so I can't use an actual php parsing library 3. what the hell do you mean I need to call an engineer? bitch, I am the software engineer. I wrote the whole goddamn website for this company and I'm plenty good at C and Java too. 4. chatGPT won't replace actual programmers. Maybe in 20-50 years they'll automate basic programming tasks, but the amount of obvious garbage code I've had to remove from my coworkers who use chatGPT is baffling. As for parsing the text itself: maybe in 20-50 years, but not in a way that's safe and reproducable. Comment deleted
ig c programmers have it even worse Comment deleted
But Java isn't fun! Comment deleted
I can believe that Java is on par with C in some tasks, given large loop count. But JavaScript? And performing similar to Go? 🤔 Comment deleted
Exactly, that's the biggest giveaway that this benchmark is bullshit Comment deleted
I once saw an "expert-made" benchmark that was optimized out to a NOP (literally, return 0;) on any optimization level starting at "-O1". So he was basically benchmarking execve(). That would be just a dumb joke, if that "expert" guy didn't send his results to Presidential Administration, blaming domestic platform for computational underperformance. Comment deleted
Yeap, I've seen this kind of stuff as well. People see fancy graphics and turn them into a fact of what's faster or slower without thinking about what the benchmark even is or how it was executed Comment deleted
Benchmarks in general don't say as much as people think they do Comment deleted
"There is just one way to benchmark it right, and a million ways to do it wrong. And guess what happens most of the time". 😭 Comment deleted
Yeah, a few days ThePrimagen and Casey Muratori had a stream about those benchmarks, and Muratori said they are BS because you need to understand more on how the language and the interpreter/compiler works to do an appropiate comparison. Comment deleted
Here is the stream on YT: https://www.youtube.com/watch?v=RrHGX1wwSYM The best moment is around 56:00 when Muratori optimize the C code of the benchmark and in the test runs faster in a 2017 computer than in a newer M series Mac 😂 Is a really good stream, because they talk about the stuff that runs under the hood like assembly instructions and how affects the behaviour of different languages. Comment deleted
v8 is weirdly powerful, that's not that surprising. especially small tasks like that can be optimized to death by a JiT like that. Comment deleted
well, it had time and other resources on optimization doesn't js have one of if not the best jit interpreters? ig especially with type-stable and otherwise easy-to-optimize code it should be fast enough Comment deleted
JavaScript has a compiler. Java is actually one of the best assembly languages ever built, he has just a VM interpreter that slows down it, but architecture is awesome Comment deleted
javascript has a JiT (usually. v8 and spidermonkey are both JiTs). java has literally nothing to do with assembly. Normally java gets compiled to custom bytecode (NOT assembly), which is then executed by a JiT. python nowadays gets compiled to bytecode before being interpreted, similar to java (except on machines that have JVM integrated into their CPU, but those are not the default) you're clearly talking about something you have no idea of Comment deleted
IIRC only pypy does this, cpython's jit is experimental (3.13) Comment deleted
bytecode isn't a JiT Comment deleted
i meant this https://docs.python.org/3/whatsnew/3.13.html#an-experimental-just-in-time-jit-compiler Comment deleted
I didn't know they're working on a JiT. but CPython has been compiling to an IR bytecode format since at least python 3.0 Comment deleted
that's what the __pycache__ is caching Comment deleted
interesting read, thanks for sharing ^^ I hope they can solve the problems with C bindings that the folks at pypy were having trouble with Comment deleted
oh i misread Comment deleted
do these machines even exist...? Comment deleted
some ARM processors have (or had?) JVM cores I believe. And basically anything from before 2010 that has a low-powered processor but can run java (something like a DVD player) Comment deleted
but those are probably all microcoded to hell, so I'm not sure how close to machine code JVM code is even then. But then again, so is x64 machine code Comment deleted
me when zen4 supports avx512 thru microcode (and sometimes being slower than avx2 per byte processed) instead of being native Comment deleted
lmao Comment deleted
What do you think is the bytecode? I simply the assembly code for java virtual machine. Is not a bunch of random number, is literally a sequence of assembly instructions. And their particularity is that no register are used for the instructions. I know the JVM architecture and in the past I wrote some code using the java ASM.. Python VM is something completely different, check the two architectures and discover why the performances are so different.. You are clearly talking about something you don't know and don't want to know Comment deleted
What makes Python bytecode not an assembly language? Comment deleted
that's what happens when a compiler is being optimized for 20+ years (also I find it a bit sus that php is so far down… it's usually suprisingly fast, not sure what's going on there. maybe the graphs are old?) Comment deleted
well, it had time and other resources on optimization Comment deleted
and cunning compilers just unwrap loops in half of langs yeah, they *try* to put some "unknown to compiler" variables with user input and rng, but compiler once again is smarter Comment deleted
ZIG PROPAGANDA 🔥 Comment deleted
zig isn't even on the first one Comment deleted
Billions must loop Comment deleted
If your implementation consists of a billion loops, you're already objectively wrong Comment deleted
How else am I supposed to count to a billion Comment deleted
In order to loop billion times, you need to...define a billion Comment deleted
Is a way to build billion operations, but if you have time can create a sequence of instructions Comment deleted
for (i 1 to 1000) for (j 1 to 1000) for (k 1 to 1000) return 1000000000 fastest loop to 1b Comment deleted
C mostly makes me feel gay Comment deleted
C makes me feel safe. My girlfriends make me feel gay Comment deleted
(my GFs also make me feel safe) Comment deleted
C++ just makes me want to start smoking Comment deleted
I've touched php 7.4 a lot recently and it genuinely makes it harder for me to stay nonalcoholic Comment deleted
pfffff Comment deleted
this image speaks a thousand words Comment deleted
rust-style enums? Comment deleted
I don't know what rust-style enums are. php 7.4 doesn't have any enums, so I made a polyfill (ish, I will need to rewrite this later when we fully switch to php 8) Comment deleted
rust-style enums are like enum Result<T, E> { Ok(T), Err(E), } (they can have additional fields and cаn be matched against) Comment deleted
hm, no Comment deleted
(the comments are forced to be there by moodle code standards) Comment deleted
couldn't you leave them as empty? Comment deleted
idk, probably not. it's not that much effort to write a comment, it's just annoying Comment deleted
Uhm Microsoft has that too in UWP but that doesn’t work Comment deleted
longer story: https://doc.rust-lang.org/stable/std/keyword.enum.html Comment deleted
yeah no, I just have key=value. I could maybe put an array as a value but that feels like a bad idea (and it'd mess with some internals) Comment deleted
just say sum types Comment deleted
PHP added enums though... Comment deleted
in 8.0.0, yeah. We've upgraded recently, but most of the code is still in php 7.4 Comment deleted
That's some unrefactored legacy code but you're using the PHP 8 interpreter since 7.4 is fully EOL now, yes? Comment deleted
full context is this: we're developing a Moodle plugin for a school, and until recently the school was using Moodle 4.0.4 with php 7.4 - a few months ago they updated to 4.4.x with 8.x, but we were never officially informed; old plugins tend to still work with new moodle. But I decided that we have to update to a newer Moodle version recently when I had enough of *gestures broadly* all this shit (doesn't help that Moodle<4.2 doesn't have good plugin API docs) we're close to release, so I can't afford to refactor any important code atm. I'm gonna do that once 1.0 is up in prod Comment deleted
I don't even like alcohol and it makes me want to drown my sorrows in it Comment deleted
a good part of it is also moodle having insane code standards for plugins Comment deleted
I wouldn't if I didn't have to Comment deleted
What the hell is zig Comment deleted
ziglang.org Comment deleted
Looks like the demon child of java and c++ Comment deleted
why java Comment deleted
Ok not that similar to java Comment deleted
so just C++ mitosis, noted Comment deleted
C++ should be sterilized, for god's sake Comment deleted