Elm Exactly
Results / elm-core /

BitwiseShiftRightZfTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`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 ms
Output
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 ms
Output
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 ms
Output
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 ms
Output
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"