Amber in jsperf.com

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Amber in jsperf.com

Dave Mason-3
I want to include the js code from the Amber benchmark in a jsperf.com comparison ( think I have a 20-40 factor speedup (based on timeToRun in a workspace and benchmarking in Chrome) but I want to set up a jsperf comparison so it's easy to compare on other browsers).

Has anyone done this?  (I don't see it from a search, but I can hope).  I had the following in the body of an html file:
  <body>
    <script type='text/javascript'>
      require.config({ paths: {
          'programmingfortherestofus': 'src' //mapping compiled .js files and smalltalk source files
      }});
      require([
          'amber/devel',
          'amber_core/Benchfib'
      ], function (smalltalk) {
      });
    </script>
  </body>

which loaded Number with the right functions, but when I try to run it from the Javascript Console with
    (20)._benchmark()
I get an error.  I presume I have to wrap that in something, but I don't know what.

../Dave

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber in jsperf.com

Herby Vojčík


Dave Mason <[hidden email]>napísal/a:

Has anyone done this?  (I don't see it from a search, but I can hope).  I had the following in the body of an html file:
  <body>
    <script type='text/javascript'>
      require.config({ paths: {
          'programmingfortherestofus': 'src' //mapping compiled .js files and smalltalk source files
      }});

The above is not needed, if you don't load anything from that namespace.

      require([
          'amber/devel',
          'amber_core/Benchfib'

amber_core/Benchfib is part of amber/devel, no need to explicitly include it

      ], function (smalltalk) {

Call to initialize is missing.

      });
    </script>
  </body>

which loaded Number with the right functions, but when I try to run it from the Javascript Console with
    (20)._benchmark()
I get an error.  I presume I have to wrap that in something, but I don't know what.

../Dave
--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.