Imzy
  • Discover communities
  • Log In
  • Sign up
  • Home
  • Discover communities
  • Log In
  • Sign up
  • About
  • Learn More
  • Contact
  • Community Policy
  • FAQ
  • Sitemap
  • Terms
  • Privacy Policy
  • Available on the App Store
  • Available on Google Play
Copyright © 2017 Saurus, Inc. All rights reserved.
OpenBSD

OpenBSD

Everything OpenBSD

17 members
Posted byoherralain/openbsd-Jul 27, 2016 at 12:21 PM

one reason to hate openbsd

one reason to hate openbsd

As for why one should care about the default setting of the compiler, the best answer I can give is that if you're in a position to care, you probably know more than enough to form your own opinion and don't need me to explain it to you.

tedunangst.com
Comments5
  • GracanaAug 11, 2016 at 10:40 AMΔ

    That's a funny example. What's a safe way to do fast inverse square root?

    • oherralaAug 11, 2016 at 1:22 PMΔ

      There's already CPU (and GPU) instructions for inverse square root.

      This benchmark has Carmack's implementation compared to CPU native instructions:

      http://assemblyrequired.crashworks.org/timing-square-root/

      • GracanaAug 12, 2016 at 8:17 AMΔ

        Hah! How times change. But, assuming you were in a situation where you wanted to use the dirty-trick method, is there a way to specify it in C? Maybe inline assembly is the correct way to do that... it would explicitly define the operation and implicitly restrict it to an architecture where it's valid, which is probably what you want anyway.

      • oherralaAug 12, 2016 at 2:29 PMΔ

        Is there some reason for dirty-tricks? Maybe if the CPU or GPU doesn't have specific instruction? Then Carmack's method might be feasible.

      • GracanaAug 14, 2016 at 10:41 AM

        Yes. That is the reason. Not everything runs on the latest intel platform.

OpenBSD

OpenBSD

Everything OpenBSD

17 members
  • About
  • Sitemap
  • Terms and Conditions
  • Privacy Policy
  • Copyright © 2017 Saurus, Inc. All rights reserved.