tinsel results

This commit is contained in:
Chris Allen 2013-01-30 00:22:09 -08:00
parent 075764b3dd
commit 6a58ce286a
2 changed files with 8 additions and 11 deletions

View file

@ -52,6 +52,12 @@ Units are in microseconds (us)
<td>38 us / 0.943 us</td>
<td>784 us / 16 us</td>
</tr>
<tr>
<td>tinsel</td>
<td>0.0052 us / 0.00017 us</td>
<td>1,100 us / 52 us</td>
<td>22,000 us / 770 us</td>
</tr>
</table>

View file

@ -56,15 +56,8 @@
(stencil/render-file "clojure_template_benchmarks/templates/list.mustache" {:items (range 1 ceil)}))
(deftemplate simple-tinsel [[:span {:class "foo"}]]
[]
(set-content bar))
(deftemplate list-tinsel [[:ul]]
[ceil]
(set-content (for [x (range 1 ceil)]
[:li x])))
(deftemplate simple-tinsel [[:span {:class "foo"}]] [] (has-class? "foo") (set-content "bar"))
(deftemplate list-tinsel [[:ul]] [ceil] (tag= :ul) (set-content (for [x (range 1 ceil)] [:li x])))
(defn -main [& args]
;; (println (simple-hiccup))
@ -120,8 +113,6 @@
;; (with-progress-reporting (quick-bench (list-stencil 1000)))
;; (println "\n --- \n")
(println (simple-tinsel))
(println (list-tinsel 50))
(println "\n\n ***** tinsel ***** \n\n")
(with-progress-reporting (quick-bench (simple-tinsel)))
(println "\n --- \n")