Threadwell

Recent Notes

  • JohannesVuorine

    Aug 26, 2026

    • archive
    • twitter
    • johannesvuorine
  • Threads

    Aug 26, 2026

    • archive
  • iquilezles

    Aug 26, 2026

    • archive
    • twitter
    • iquilezles
Home

❯

Archive

❯

Threads

❯

iquilezles

❯

Hey, don't "optimize" conditional moves with mix()+step().

❯

@iquilezles compilers are smart enough to take care of conditional logic without branching(or conditional jump) in many cases, so don't pretend to be smart and just use if else.

@iquilezles compilers are smart enough to take care of conditional logic without branching(or conditional jump) in many cases, so don't pretend to be smart and just use if else.

Properties5
typearchive
sourcetwitter
date2025-02-10
tagsarchive, twitter, iquilezles
description@iquilezles compilers are smart enough to take care of conditional logic without branching(or conditional jump) in many cases, so don't pretend to be smart and just use if else.

Feb 10, 20251 min read

  • archive
  • twitter
  • iquilezles

Source

  • URL: https://x.com/evildisease/status/1889033552425333239
  • Author: Street Mouse (@evildisease)
  • Posted: 2025-02-10 19:27:50

Branch

1/ @evildisease

@iquilezles

compilers are smart enough to take care of conditional logic without branching(or conditional jump) in many cases, so don’t pretend to be smart and just use if else.

Related

  • Spine: 2025-02-09-hey-dont-optimize-conditional-moves-with-mix-step

Graph View

  • Source
  • Branch
  • Related

Backlinks

  • Hey, don't "optimize" conditional moves with mix()+step().

Created with Quartz v5.0.0 © 2026

  • GitHub