Map Destructure generates overly verbose code

Description

Currently any kind of desctructured map ends up emiting a check if the destructured argument is a seq to support kw-args style turning it into a map.

https://github.com/clojure/clojurescript/blob/e1857b454978b60969859bf0792ee744534fb582/src/main/clojure/cljs/core.cljc#L669

The `(implements? ISeq gmap)` check is using a macro and ends up emitting something like this JS

Which when optimized still leaves

If we instead create a simple helper fn that does the conversion we could end up with

Given how often destructuring is used this could reduce a code size decently. Given that is not always uses the same variable names when checking this doesn't gzip-away so well otherwise too.

Environment

None

Status

Assignee

Thomas Heller

Reporter

Thomas Heller

Labels

None

Approval

Ok

Patch

None

Priority

Minor
Configure