You ever write code so inefficient you have to start complaining about the global allocation of RAM

all 27 comments

sorted by: hot top controversial new old
[–] 110 points 6 days ago (4 children)

When he said that my first thought was "Are you sure you wanna talk about efficiency?"

  • source
  • hideshow 4 child comments
  • [–] 52 points 6 days ago (3 children)

    My 1st thought was “Are you sure you wanna talk about the optimal resource allocation for society?”

  • source
  • parent
  • hideshow 3 child comments
  • [–] 30 points 6 days ago (2 children)

    Mine was more specific: "How many homes do you own and what percentage of the rooms are occupied right now?"

  • source
  • parent
  • hideshow 2 child comments
  • [–] 12 points 5 days ago (1 child)

    It'd be more efficient for his organs to be split up and distributed to those on waiting lists.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 67 points 6 days ago (5 children)

    I once ran 3 electron apps at the same time which is basically the same thing

  • source
  • hideshow 5 child comments
  • [–] 15 points 6 days ago (1 child)

    I once had three windows of VSCode open. And two of them were Typescript.

    Seriously, though. Why the fuck is the ESLint extension so horrible? Slow, bloated, misses changes outside the current file, and needs gigabytes of memory.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 5 days ago

    Panicing as I'm typing a line like if MSWord said "antidep" was a spelling error before I finished "ressant". I uninstalled it. I'll just let Intellisense help me instead and ESLint can run when I build.

  • source
  • parent
  • [–] 51 points 6 days ago (1 child)

    I've managed to convince investors that my brute force solution is worth trillions.

  • source
  • hideshow 1 child comment
  • [–] 31 points 6 days ago* (1 child)

    Tbf opposite happened a couple of times too where I was like "if only a nuclear war sent our hardware 30 years back so people would appreciate this logic right here."

  • source
  • hideshow 1 child comment
  • [–] 23 points 6 days ago (2 children)

    I’ve had a problem like that once, but then I realized it made way more sense to allocate a big swap file instead and map that to memory.

  • source
  • hideshow 2 child comments
  • [–] 18 points 6 days ago (1 child)

    But what if you "needed" to access all of that memory every single time you produced an output character? And (only hypothetically of course) "all of that memory" was like dozens of gigs at a time.

    Only truly visionary computer scientists could be capable of such genius.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 16 points 6 days ago

    Node developers sheepishly look away

  • source
  • [–] 16 points 6 days ago (2 children)

    malloc(999999999999999999999999999999999)

  • source
  • hideshow 2 child comments
  • [–] 8 points 6 days ago (1 child)

    malloc(18,446,744,073,709,551,615)

    ULLONG_MAX from limits.h - so on a 64bit machine size_t = unsigned long long = uint64

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 6 days ago

    How about the equivalent malloc(-1)?

    Also, it's cheap to allocate memory if you never write to it. You should follow it up with memset() if you really wanna max out your Resident Set Size 🐏

  • source
  • parent
  • [–] 13 points 6 days ago

    Just once but my parents grounded me and took away my gameboy

  • source
  • [–] 12 points 6 days ago

    Imagine being roasted on every social platform.

    [Nobody likes you.]

    Even the cuckholders.

  • source
  • [–] 5 points 6 days ago

    You think he wrote that code himself?

  • source
  • [–] 3 points 5 days ago

    Oh yes. I have rewritten other apps just to free more memory for my inefficient code

  • source
  • [–] 3 points 6 days ago

    For your retooting pleasure: labyrinth.social/@nash/1175421…RE: labyrinth.social/users/nash/st…

  • source