GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    CMD (ceo_of_monoeye_dating@tsundere.love)'s status on Saturday, 14-Feb-2026 07:12:53 JST CMD CMD
    • Ghislaine :dancing_z:
    @Ghislaine The simplest branch prediction is "it will" though :chino_dead1:
    In conversation about 9 days ago from tsundere.love permalink
    • Johnny Peligro likes this.
    • Embed this notice
      CMD (ceo_of_monoeye_dating@tsundere.love)'s status on Saturday, 14-Feb-2026 07:13:16 JST CMD CMD
      in reply to
      • Ghislaine :dancing_z:
      • protoss
      @nigger @Ghislaine No.

      When you execute instructions on a modern CPU it goes through this thing called a "pipeline." Essentially instead of executing one instruction at once, it executes part of 5-20 instructions at once. When one of those instructions is a conditional branch, this has the impact of potentially flushing out the entire pipeline because a lot of those partially executed instructions are invalid, which slows the computer down!

      Branch prediction allows you to mitigate the impact of that - if you know how you're going to branch, you can pick the right set of instructions to feed through the pipeline most of the time, which is good enough for a substantial performance improvement. You don't need it to be perfect, you just need it to be cheap and better than nothing.
      In conversation about 9 days ago permalink
      Johnny Peligro likes this.
    • Embed this notice
      CMD (ceo_of_monoeye_dating@tsundere.love)'s status on Saturday, 14-Feb-2026 07:13:16 JST CMD CMD
      in reply to
      • Ghislaine :dancing_z:
      • protoss
      @nigger @Ghislaine Essentially the difference between the two is "did I jump to the next line in my code or did I jump somewhere else?" They're meaningfully different from an engineering perspective. Even if you *could* in theory write the code so that it's logically equivalent, anyone who actually does this should have their heads blown off because the code is disgusting.
      In conversation about 9 days ago permalink
      Johnny Peligro likes this.
    • Embed this notice
      protoss (nigger@detroitriotcity.com)'s status on Saturday, 14-Feb-2026 07:13:18 JST protoss protoss
      in reply to
      • Ghislaine :dancing_z:
      @ceo_of_monoeye_dating @Ghislaine aren't they just equivalent since the other branch is just boolean negation?
      In conversation about 9 days ago permalink
    • Embed this notice
      ?? Humpleupagus ?? (humpleupagus@eveningzoo.club)'s status on Saturday, 14-Feb-2026 07:48:04 JST ?? Humpleupagus ?? ?? Humpleupagus ??
      in reply to
      • Ghislaine :dancing_z:
      • protoss
      • Växẍ Säbbäth
      When you install python on arch, the repo maintainers send you a free pair of stripped knee high socks.
      In conversation about 9 days ago permalink
    • Embed this notice
      Växẍ Säbbäth (vaxxsabbath@detroitriotcity.com)'s status on Saturday, 14-Feb-2026 07:48:05 JST Växẍ Säbbäth Växẍ Säbbäth
      in reply to
      • Ghislaine :dancing_z:
      • protoss

      @nigger @ceo_of_monoeye_dating @Ghislaine Python is the gateway drug to transsexuality

      change my mind

      In conversation about 9 days ago permalink
    • Embed this notice
      CMD (ceo_of_monoeye_dating@tsundere.love)'s status on Saturday, 14-Feb-2026 07:48:06 JST CMD CMD
      in reply to
      • Ghislaine :dancing_z:
      • protoss
      @nigger @Ghislaine Statistically, no!

      If you consider the very simple code:

      i = 0
      while i < 5:
      print(i)
      i = i + 1

      This branches every time until i hits 5.

      So, it hits the branch:
      i = 1: jump up
      i = 2: jump up
      i = 3: jump up
      i = 4: jump up
      i = 5: don't jump

      Which is 80% of the time. It turns out that most code is written kinda like this; you're just usually in a loop of some kind that's incrementing, so you're usually just making the jump.
      In conversation about 9 days ago permalink
    • Embed this notice
      protoss (nigger@detroitriotcity.com)'s status on Saturday, 14-Feb-2026 07:48:06 JST protoss protoss
      in reply to
      • Ghislaine :dancing_z:
      @ceo_of_monoeye_dating @Ghislaine >python
      that's a place where no optimisation shines
      :jahy_disgust:
      In conversation about 9 days ago permalink
    • Embed this notice
      CMD (ceo_of_monoeye_dating@tsundere.love)'s status on Saturday, 14-Feb-2026 07:48:07 JST CMD CMD
      in reply to
      • Ghislaine :dancing_z:
      • protoss
      @nigger @Ghislaine Sure, the conditional within the branch can be reduced to being logically equivalent by using a different instruction (in modern architectures) but it still reduces to "are you jumping to the line specified in the code or not," and you do usually jump to the line.
      In conversation about 9 days ago permalink
    • Embed this notice
      protoss (nigger@detroitriotcity.com)'s status on Saturday, 14-Feb-2026 07:48:07 JST protoss protoss
      in reply to
      • Ghislaine :dancing_z:
      @ceo_of_monoeye_dating @Ghislaine isn't it 50/50 for conditional jump and 100/0 for unconditional? or is some C
      if (errorbyvalue(x))
      exit(1);
      bullshit going on here?
      In conversation about 9 days ago permalink
    • Embed this notice
      protoss (nigger@detroitriotcity.com)'s status on Saturday, 14-Feb-2026 07:48:08 JST protoss protoss
      in reply to
      • Ghislaine :dancing_z:
      @ceo_of_monoeye_dating @Ghislaine I know that much, but whether the condition is true or false in the no branch jump case differs based on how you lower to assembly except for an if with no else
      In conversation about 9 days ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.