▲ 918 ▼ Simple Optimization Trick (lemmy.zip) submitted 1 year ago by Maven@lemmy.zip to c/programmer_humor@programming.dev 54 comments fedilink hide all child comments
[–] Blue_Morpho@lemmy.world 37 points 1 year ago (4 children) Before Doom (1993), almost all games were assembly. Carmack wrote Wolfenstein 3d in C. Star Control and Dune 2 were C. permalink fedilink source parent hideshow 4 child comments replies: [–] Rai@lemmy.dbzer0.com 15 points 1 year ago (1 child) > almost permalink fedilink source parent hideshow 1 child comment replies: [–] Blue_Morpho@lemmy.world 5 points 1 year ago* (last edited 1 year ago) I used those as examples but I claim that most everything was C by the early 90's. The statement that C compilers got fast which allowed it isn't true. When a new compiler came out it was always a couple of percentage points faster than the old version. Meanwhile hardware was doubling in performance every two years. C compilers didn't need much optimization because there wasn't much performance that could be optimized into code on the simple CPUs of 1992 when Doom was being written. CPU's weren't the superscalar multi core monsters they are today. A compiler couldn't take advantage of reordering instructions to use multiple adders because there was only one. permalink fedilink source parent [–] frezik@lemmy.blahaj.zone 5 points 1 year ago (1 child) Those games didn't have the splash that Doom did for this sort of thing. https://web.archive.org/web/20010105180900/http://www.gamespy.com/legacy/articles/devweek_c.shtm Mainstream application programmers switched to C in the early 80's. Game developers were slower to switch, because their small teams and focus on performance kept assembly language viable till the following decade. When id Software released DOOM, they surprised much of the industry by having no reliance on assembly code--despite excellent game performance, and by successfully cross-developing the game (in NeXTstep and DOS), then successfully porting it to an astounding variety of platforms. permalink fedilink source parent hideshow 1 child comment replies: [–] Ensign_Crab@lemmy.world 4 points 1 year ago Those games didn’t have the splash that Doom did for this sort of thing. I would say that Wolf3d would certainly count as proof of concept. permalink fedilink source parent
[–] Rai@lemmy.dbzer0.com 15 points 1 year ago (1 child) > almost permalink fedilink source parent hideshow 1 child comment replies: [–] Blue_Morpho@lemmy.world 5 points 1 year ago* (last edited 1 year ago) I used those as examples but I claim that most everything was C by the early 90's. The statement that C compilers got fast which allowed it isn't true. When a new compiler came out it was always a couple of percentage points faster than the old version. Meanwhile hardware was doubling in performance every two years. C compilers didn't need much optimization because there wasn't much performance that could be optimized into code on the simple CPUs of 1992 when Doom was being written. CPU's weren't the superscalar multi core monsters they are today. A compiler couldn't take advantage of reordering instructions to use multiple adders because there was only one. permalink fedilink source parent
[–] Blue_Morpho@lemmy.world 5 points 1 year ago* (last edited 1 year ago) I used those as examples but I claim that most everything was C by the early 90's. The statement that C compilers got fast which allowed it isn't true. When a new compiler came out it was always a couple of percentage points faster than the old version. Meanwhile hardware was doubling in performance every two years. C compilers didn't need much optimization because there wasn't much performance that could be optimized into code on the simple CPUs of 1992 when Doom was being written. CPU's weren't the superscalar multi core monsters they are today. A compiler couldn't take advantage of reordering instructions to use multiple adders because there was only one. permalink fedilink source parent
[–] frezik@lemmy.blahaj.zone 5 points 1 year ago (1 child) Those games didn't have the splash that Doom did for this sort of thing. https://web.archive.org/web/20010105180900/http://www.gamespy.com/legacy/articles/devweek_c.shtm Mainstream application programmers switched to C in the early 80's. Game developers were slower to switch, because their small teams and focus on performance kept assembly language viable till the following decade. When id Software released DOOM, they surprised much of the industry by having no reliance on assembly code--despite excellent game performance, and by successfully cross-developing the game (in NeXTstep and DOS), then successfully porting it to an astounding variety of platforms. permalink fedilink source parent hideshow 1 child comment replies: [–] Ensign_Crab@lemmy.world 4 points 1 year ago Those games didn’t have the splash that Doom did for this sort of thing. I would say that Wolf3d would certainly count as proof of concept. permalink fedilink source parent
[–] Ensign_Crab@lemmy.world 4 points 1 year ago Those games didn’t have the splash that Doom did for this sort of thing. I would say that Wolf3d would certainly count as proof of concept. permalink fedilink source parent