Great! Congratulation. You improved it a lot.
This should do good to stencil users, the code runs much faster now.

I did not implement the  "Set Delimiter" and "lambdas" and "Dotted Names",
etc.  You implemented the whole SPEC, this should be point out.

For a little background why I implemented
Mustache.clj<https://github.com/shenfeng/mustache.clj>
:
I was doing https://github.com/shenfeng/rssminer ,the way I generate HTML
is slow.
I love Mustache, it's great. I rewrite it using Mustache by using the
Clojure implention list here: http://mustache.github.com/.
The performance did not improve much.
*Without further reseach to find another one*, I write a Mustache
implementation for myself to reduce the latency of Rssminer.


On Fri, Jul 20, 2012 at 5:11 AM, David Santiago <david.santi...@gmail.com>wrote:

> Just wanted to stop by and update this thread with the latest
> information. I just released Stencil 0.3, at
> http://github.com/davidsantiago/stencil and it contains many
> performance improvements. I have pushed the benchmarks I use to test
> it, including an adaptation of yours, to
> http://github.com/davidsantiago/mustachequerade; the readme has an
> example run. Performance of course depends on the templates and data,
> but 0.3 ranges from nearly as fast as your mustache to 2x the runtime.
>
> In particular, for the benchmark you posted, I now get runtimes for a
> single template render of 13us in mustache.clj vs. 25us in Stencil.
> I'm not satisfied with those numbers, and will continue to push them
> lower in future versions, but the 10x difference in runtime is clearly
> no longer the case.
>
>   David
>
> On Wed, Jul 11, 2012 at 8:50 PM, Shen, Feng <shen...@gmail.com> wrote:
> > Yes, you are right.  Stencil did a very good job.
> > I only implement a subset.  Test code .   "Set Delimiter" and "lambdas"
> and
> > "Dotted Names" are not implemented.
> >
> > The algorithm of this implementation is borrowed from Mustache.js.
> > I read the code,  It's brilliant.
> >
> > I'v used Mustache in several projects. I like it. It's simple and
> brilliant.
> > "Set Delimiter" and "lambdas" are never used.  This is why they are not
> > implemented currently. I will implement the whole Spec when I find the
> time.
> >
> >
> > On Thu, Jul 12, 2012 at 9:26 AM, Anthony Grimes <disciplera...@gmail.com
> >
> > wrote:
> >>
> >> Stencil is spec compliant (the tests actually run against the spec)
> while
> >> this implementation is not. A major goal behind stencil is to be totally
> >> spec compliant and as fast as possible. However, implementing the slow
> parts
> >> of the spec is important too.
> >>
> >>
> >> On Wednesday, July 11, 2012 6:28:23 PM UTC-5, Feng Shen wrote:
> >>>
> >>> From http://mustache.github.com/, I only notice clostache, which is a
> >>> little slow.
> >>> I have not noticed stencil, if I do, probability, I will not do one
> >>> myself. It's pretty fast.
> >>> My implementation seems faster than stencil, in a test run, up to 10x.
> >>> Test code:
> >>>
> https://github.com/shenfeng/mustache.clj/blob/master/test/me/shenfeng/perf_bench.clj
> >>> It seems stencil is more feature rich than mine.  For example, I did
> not
> >>> implement "Set Delimiter".
> >>>
> >>>
> >>> On Wednesday, July 11, 2012 9:45:51 PM UTC+8, Baishampayan Ghose wrote:
> >>>>
> >>>> > I did yet another {{mustache}} implementation for Clojure
> >>>> >
> >>>> > https://github.com/shenfeng/mustache.clj
> >>>> >
> >>>> > I did it because I need a faster one when I am doing Rssminer . And
> I
> >>>> > dit
> >>>> > it.
> >>>> > By the way, Rssminer is yet another RSS reader, but written in
> >>>> > Clojure.
> >>>> >
> >>>> > Usage:
> >>>> >
> >>>> > [me.shenfeng/mustache "0.0.4"]
> >>>> >
> >>>> > (:use me.shenfeng.mustache)
> >>>> >
> >>>> > (deftemplate template "{{template}}")
> >>>> > (to-html template {:you-data "data"}) ;; returns String
> >>>> >
> >>>> > Let me know if you have any ideas or questions.
> >>>>
> >>>> Shen,
> >>>>
> >>>> Very nice work. Have you benchmarked your mustache lib with stencil?
> >>>> It would be an interesting comparison.
> >>>>
> >>>> Regards,
> >>>> BG
> >>>>
> >>>> --
> >>>> Baishampayan Ghose
> >>>> b.ghose at gmail.com
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Clojure" group.
> >> To post to this group, send email to clojure@googlegroups.com
> >> Note that posts from new members are moderated - please be patient with
> >> your first post.
> >> To unsubscribe from this group, send email to
> >> clojure+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/clojure?hl=en
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with
> your
> > first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to