Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19387

Re: Operation in String to Double conversion

Received by 10.224.31.20 with SMTP id w20mr8291836qac.2.1350340879851; Mon, 15 Oct 2012 15:41:19 -0700 (PDT)
Received by 10.52.29.174 with SMTP id l14mr2047676vdh.13.1350340879824; Mon, 15 Oct 2012 15:41:19 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!l8no53134261qao.0!news-out.google.com!r17ni34184845qap.0!nntp.google.com!l8no53134251qao.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Mon, 15 Oct 2012 15:41:19 -0700 (PDT)
In-Reply-To <k5i1sc$8ei$1@dont-email.me>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=78.43.7.220; posting-account=hxA_FQoAAAAqlCH2RDDZ0yu2qTWBtp-O
NNTP-Posting-Host 78.43.7.220
References <3a63483c-4322-4bfb-8c28-2d528bf48443@googlegroups.com> <k5f7gf$p6g$2@localhost.localdomain> <b9f3c86c-4871-45d0-914d-6b345667d892@googlegroups.com> <k5fg4d$nu6$1@dont-email.me> <afe33c9e-8aff-4fbe-afbc-98f51e2bc26e@googlegroups.com> <k5i1sc$8ei$1@dont-email.me>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <eb49e6db-ae18-44bd-a6c2-c0006780216d@googlegroups.com> (permalink)
Subject Re: Operation in String to Double conversion
From frank.asseg@gmail.com
Injection-Date Mon, 15 Oct 2012 22:41:19 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Lines 20
Xref csiph.com comp.lang.java.programmer:19387

Show key headers only | View raw


On Tuesday, October 16, 2012 12:14:36 AM UTC+2, Daniele Futtorovic wrote:


> [...] and if I were the OP, and didn't have the
> alternative of using the scripting engine (or if my task required
> functions and the other more advanced features you offer), I'd probably
> give your lib a good second look.
the jsr223 scripting engine works fine, but is rather slow, this is the comparison with pure java math, livetribe's jsr223 implementation and exp4j from the tests on my local desktop machine:

expression		log(x) - y * (sqrt(x^cos(y)))
exp4j			1123189 [561.59k calc/sec]
Java Math		4590231 [2295.12k calc/sec]
JSR 223(Javascript)	1674 [837.0 calc/sec]

This of course is a very synthetic benchmark, but be aware that the scripting engine can be quite slow when performing a lot of operations, and a lot of performance is to be gained with a pure java implementation. and this argument does neither include the time to warm up the script engine nor the increased memory footprint.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Operation in String to Double conversion William Lopes <williamlopes.dev@gmail.com> - 2012-10-14 12:39 -0700
  Re: Operation in String to Double conversion Martin Gregorie <martin@address-in-sig.invalid> - 2012-10-14 20:32 +0000
    Re: Operation in String to Double conversion William Lopes <williamlopes.dev@gmail.com> - 2012-10-14 14:08 -0700
      Re: Operation in String to Double conversion markspace <-@.> - 2012-10-14 15:59 -0700
        Re: Operation in String to Double conversion William Lopes <williamlopes.dev@gmail.com> - 2012-10-14 17:45 -0700
        Re: Operation in String to Double conversion frank.asseg@gmail.com - 2012-10-15 11:18 -0700
          Re: Operation in String to Double conversion Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-10-16 00:14 +0200
            Re: Operation in String to Double conversion frank.asseg@gmail.com - 2012-10-15 15:41 -0700
        Re: Operation in String to Double conversion frank.asseg@gmail.com - 2012-10-15 11:27 -0700
          Re: Operation in String to Double conversion Lew <lewbloch@gmail.com> - 2012-10-15 12:40 -0700
            Re: Operation in String to Double conversion frank.asseg@gmail.com - 2012-10-15 14:24 -0700
              Re: Operation in String to Double conversion Lew <lewbloch@gmail.com> - 2012-10-15 14:48 -0700
              Re: Operation in String to Double conversion Arved Sandstrom <asandstrom2@eastlink.ca> - 2012-10-15 19:14 -0300
                Re: Operation in String to Double conversion Arne Vajhoej <arne@vajhoej.dk> - 2012-10-17 16:58 -0400
              Re: Operation in String to Double conversion Arne Vajhoej <arne@vajhoej.dk> - 2012-10-17 17:02 -0400
            Re: Operation in String to Double conversion Arne Vajhoej <arne@vajhoej.dk> - 2012-10-17 17:13 -0400
              Re: Operation in String to Double conversion Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-17 17:32 -0400
  Re: Operation in String to Double conversion Roedy Green <see_website@mindprod.com.invalid> - 2012-10-14 22:49 -0700
  Re: Operation in String to Double conversion "John B. Matthews" <nospam@nospam.invalid> - 2012-10-15 13:19 -0400
    Re: Operation in String to Double conversion Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-10-15 12:51 -0700
      Re: Operation in String to Double conversion "John B. Matthews" <nospam@nospam.invalid> - 2012-10-16 09:39 -0400
  Re: Operation in String to Double conversion Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-15 20:47 -0400
  Re: Operation in String to Double conversion Arne Vajhoej <arne@vajhoej.dk> - 2012-10-17 16:54 -0400

csiph-web