Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
Sorgente: math.js
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
Sorgente: math.js
Is there a standard way of referencing objects by identity in JSON? For example, so that graphs and other data structures with lots of (possibly circular) references can be sanely serialized/loaded?
https://stripe.com/it
This looks quite interesting:
A set of unified APIs and tools that instantly enables businesses to accept and manage online payments.
A beautiful, optimized, cross-device payment form, with support for single click payments.
I do understand that today designs tend to put less emphasis on conservative memory usage but that’s pretty outrageous. A simple search into node’s package manager ate one gigabyte and half of main memory having to deal with a simple question like
npm find foobar
more speficically GNU time told me that it took 48 seconds and 1799Mb of resident memory to scan thorugh a local list of the 169.312 total packages available from npmjs.com.
Apt, the almighty Debian package manager consumed a mere 99 MegaBytes to search into package names and descriptions throught more than an hundred thousands packages (107819) which are usually far beefier that javascript modules.
That’s more than eighteen times.
Javascript, your librarian is obese.
Javascript, HTML5 and the browser in all its incarnations are quickly becoming the new amazing way of developing applications for the “plain and simple end-user”.
On the MacBook Pro Javascript was 44% slower than C (Java only 1.5%). The Javascript Nitro VM on my iPhone 4S was 99% slower than C. On the Nexus 7 there’s once again the same image: Java is 106% slower than C, Javascript only 43%. Amazing. For simple numeric benchmarks the performance of Javascript is simply astonishing. On the MacBook Pro Javascript is incredibly close to the performance of C and Java. On the iPhone Javascript was within a range of factor 2.1. For me it was very surprising to see V8 on Android being able to beat Java on the Davlik VM by a large margin.Fine print: Slower and faster usually cause headaches in benchmarks (There a nice paper about that http://hal.inria.fr/docs/00/73/92/37/PDF/percentfaster-techreport.pdf). I sticked with the elapsed time, such that e.g. 42% slower means that the factor of the durations was 1.42. On the MacBook Pro C was compiled with clang using -O3 -fomit-frame-pointer -march=native -mfpmath=sse -msse3 for x64. Java was Oracle Hotspot 1.8.0-ea-b87 on 64 bit (thus C2 aka Server Hotspot). Chrome was 28.0.1493.0, but the 32 bit version. I tried to compile V8 myself, but both the x86 and x64 custom built V8 were significantly slower than Chrome so I stick with Chrome. On the iPhone I used a release configuration using clang with (among others) -O3 -arch armv7 The Google Nexus 7 runs Android 4.2.2, Chrome 26.0.1410.58. C was compiled with -march=armv6 -marm -mfloat-abi=softfp -mfpu=vfp -O3.
Sorgente: C, Java and Javascript numeric benchmark and a big surprise | Stefan Krause.blog()