Elm Exactly
Results / elm-core /

BitwiseXorTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Bitwise.xor` gives the bitwise exclusive or of two Ints: 15 xor 8 is 7, 15 xor 16 is 31, and 15 xor 15 is 0.

Results

elm-0.19.1

passran in 74 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
xor1: 7
xor2: 31
xor3: 0

elm-0.19.2

passran in 54 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
xor1: 7
xor2: 31
xor3: 0

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.
xor1: 7
xor2: 31
xor3: 0

lamdera-1.5.0

passran in 66 ms
Output
xor1: 7
xor2: 31
xor3: 0

Discussions

Discuss this test·Search the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module BitwiseXorTest exposing (main)
{-| `Bitwise.xor` gives the bitwise exclusive or of two Ints: 15 xor 8 is 7, 15 xor 16 is 31, and 15 xor 15 is 0.
-}
-- CHECK: xor1: 7
-- CHECK: xor2: 31
-- CHECK: xor3: 0
import Bitwise
import Html exposing (text)
main =
let
_ = Debug.log "xor1" (Bitwise.xor 15 8)
_ = Debug.log "xor2" (Bitwise.xor 15 16)
_ = Debug.log "xor3" (Bitwise.xor 15 15)
in
text "done"