BitwiseXorTest
`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 msOutput
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 msOutput
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 msOutput
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 msOutput
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"