BitwiseShiftRightZfTest
`Bitwise.shiftRightZfBy` shifts a positive Int right, filling with zeros: 16 shifted by 4 is 1 and by 1 is 8.
Results
elm-0.19.1
passran in 72 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. shrz1: 1 shrz2: 8
elm-0.19.2
passran in 64 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. shrz1: 1 shrz2: 8
elm-0.19.3
passran in 68 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. shrz1: 1 shrz2: 8
lamdera-1.5.0
passran in 55 msOutput
shrz1: 1 shrz2: 8
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/BitwiseShiftRightZfTest] in its title.
Source
The -- CHECK: lines give the expected output.
module BitwiseShiftRightZfTest exposing (main)
{-| `Bitwise.shiftRightZfBy` shifts a positive Int right, filling with zeros: 16 shifted by 4 is 1 and by 1 is 8.
-}
-- CHECK: shrz1: 1
-- CHECK: shrz2: 8
import Bitwise
import Html exposing (text)
main =
let
_ = Debug.log "shrz1" (Bitwise.shiftRightZfBy 4 16)
_ = Debug.log "shrz2" (Bitwise.shiftRightZfBy 1 16)
in
text "done"