hylang/hy — pull request #625 by microamp (2014-07-22 11:45:49+00:00)
Title: Add a simple 'timeit' macro

I understand there's ``profile/calls`` and ``profile/cpu`` macros under Contrib, but there are times when you want something simpler and quicker. More like IPython's ``%timeit`` magic function.

The ``timeit`` macro here takes a body of expressions, outputs the number of milliseconds taken to evaluate it, and returns the value of the body.

The following example builds a list of numbers from 0 to 10,000,000, then counts the number of items in the list.
```
hy 0.10.0 using CPython(default) 3.4.1 on Linux
=> (timeit (len (list (range 10000000))))
Time elapsed: 368.002 ms
10000000
```
compared to Python using IPython (slightly faster),
```
In [1]: %timeit len(list(range(10000000)))
1 loops, best of 3: 302 ms per loop
```

Thanks for reviewing in advance.