Elm Exactly
Results / elm-core /

DictRemoveMinimalTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Dict.remove` deletes the smaller of two keys from a two-entry `Dict Int Int`, leaving a dictionary of size 1.

The dictionary is built with `Dict.singleton 1 10` followed by `Dict.insert 2 20`, and key 1 is removed.

Results

elm-0.19.1

passran in 69 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
size: 1

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.
size: 1

elm-0.19.3

passran in 71 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
size: 1

lamdera-1.5.0

passran in 66 ms
Output
size: 1

Discussions

Discuss this test·Search the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module DictRemoveMinimalTest exposing (main)
{-| `Dict.remove` deletes the smaller of two keys from a two-entry `Dict Int Int`, leaving a dictionary of size 1.
The dictionary is built with `Dict.singleton 1 10` followed by `Dict.insert 2 20`, and key 1 is removed.
-}
-- CHECK: size: 1
import Dict
import Html exposing (text)
main =
let
d =
Dict.insert 2 20 (Dict.singleton 1 10)
removed =
Dict.remove 1 d
_ =
Debug.log "size" (Dict.size removed)
in
text "done"