# Comparing uglifyjs and google-closure-compiler

**URL:** <https://discourse.elm-lang.org/t/comparing-uglifyjs-and-google-closure-compiler/2883>\
**Category:** Show and Tell\
**Created:** [January 4, 2019, 9:09pm UTC](https://discourse.elm-lang.org/t/comparing-uglifyjs-and-google-closure-compiler/2883 "2019-01-04T21:09:38Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![opvasger](https://avatars.discourse-cdn.com/v4/letter/o/8e8cbc/32.png) [@opvasger](https://discourse.elm-lang.org/u/opvasger)\
**Post date:** [January 9, 2019, 7:56am UTC](https://discourse.elm-lang.org/t/comparing-uglifyjs-and-google-closure-compiler/2883/4 "2019-01-09T07:56:01Z")

</div>

Hello ☀ I’m maintaining [elm-minify](https://github.com/opvasger/elm-minify) which uses [terser](https://github.com/terser-js/terser) under the hood. my results for Richards [spa-example](https://github.com/rtfeldman/elm-spa-example) look like this:

#### commands

```auto
git clone git@github.com:rtfeldman/elm-spa-example.git

cd elm-spa-example

elm make src/Main.elm --optimize --output=elm.js

time elm-minify elm.js

```

#### output

```auto
 Initial size: 370448 bytes
Minified size: 93144 bytes
 Gzipped size: 29838 bytes (measured using Node.js zlib)

    real time: 4939 milliseconds
    user time: 6885 milliseconds
     sys time: 116 milliseconds

```

I don’t know exactly why the results are better in this case, but I guess the terser-folks have done more optimizations?

- @christian, would you mind building your project with `elm-minify` once, sending me the results? I’d like to see how it performs with your much bigger project! ☀

- has anyone measured the runtime using `uglify` and/or `closure`?

> [@razze](#):
>
> Terser also doesn’t need be called two times, I think.

Yup, I call terser once, and haven’t had any issues ☀ I did some comparisons for Richard [here](https://github.com/opvasger/elm-minify/issues/23#issuecomment-450806942).

---

_[View the full topic](https://discourse.elm-lang.org/t/comparing-uglifyjs-and-google-closure-compiler/2883)._
