Re: [Haskell] Expecting more inlining for bit shifting

2006-10-10 Thread Bulat Ziganshin
Hello roconnor, Monday, October 9, 2006, 3:41:00 AM, you wrote: > JMP_((W_)&Main_zdwshift_info); > My question is, why the discrepency? because it was not inlined at all? try to add INLINE pragmas: {-# INLINE shift #-} -- Best regards, Bulatmailto:[EMAIL PROTE

[Haskell] Expecting more inlining for bit shifting

2006-10-08 Thread roconnor
Consider the following GHC code: module Main where import GHC.Word import GHC.Base import GHC.Prim import Random a `shiftRLT` b | b >=# 32# = int2Word# 0# | otherwise = a `uncheckedShiftRL#` b (W32# x#) `shift` (I# i#) | i# >=# 0#= W32# (narrow32Word# (x# `sh