Elm Exactly
Results / elm-core /

BitwiseAndTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Bitwise.and` returns the bits two `Int`s have in common.

Results

elm-0.19.1

passran in 75 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
and1: 8
and2: 0
and3: 15

elm-0.19.2

passran in 50 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
and1: 8
and2: 0
and3: 15

elm-0.19.3

passran in 48 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
and1: 8
and2: 0
and3: 15

lamdera-1.5.0

passran in 58 ms
Output
and1: 8
and2: 0
and3: 15

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm-core/BitwiseAndTest] in its title.

Source

The -- CHECK: lines give the expected output.

module BitwiseAndTest exposing (main)
{-| `Bitwise.and` returns the bits two `Int`s have in common.
-}
-- CHECK: and1: 8
-- CHECK: and2: 0
-- CHECK: and3: 15
import Bitwise
import Html exposing (text)
main =
let
_ = Debug.log "and1" (Bitwise.and 15 8)
_ = Debug.log "and2" (Bitwise.and 15 16)
_ = Debug.log "and3" (Bitwise.and 15 15)
in
text "done"