koz,
@koz@chaos.social avatar

Fedi: do int2Word# and similar operations have a runtime cost? I assume 'no', but I'd like to be sure.

BoydStephenSmithJr,
@BoydStephenSmithJr@hachyderm.io avatar

@koz I'm not sure but I think https://github.com/ghc/ghc/blob/bf3d4db0894233ec72f092a4a34bce9ed4ff4e21/compiler/GHC/Builtin/primops.txt.pp#L817 says that actually no code is emitted for that prim op, which would mean no runtime cost.

Hopefully, a expert will come through and confirm or correct me.

Of course, that's not part of the language spec, or the public API of GHC, so it could change on a whim. (It won't.)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • haskell
  • kavyap
  • ngwrru68w68
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • khanakhh
  • slotface
  • everett
  • vwfavf
  • rosin
  • osvaldo12
  • megavids
  • GTA5RPClips
  • ethstaker
  • tacticalgear
  • InstantRegret
  • cisconetworking
  • cubers
  • tester
  • anitta
  • modclub
  • Leos
  • normalnudes
  • provamag3
  • JUstTest
  • All magazines