I found a cool blog about logical fallacies, here's all of its images :3 (until today: 15), check their blog for more updated content :3
programming: the action or process of writing computer programs. | rants: speak or shout at length in a wild, [im]passioned way.
2016-12-26
2016-12-25
2016-12-17
2016-12-09
Javascript ES6 to ES5 Transpiler
When you are so eager to use ES6 features but you know that most browsers not yet implement all ES6 features completely (that's why there are also HTML5 pollyfills). Here's the list of transpiler to convert Javascript ES6 to ES5:
- Google's Traceur Compiler
- Google's Caja (client-server)
- Babel (if not sure, use this one)
- Termi ES6 Transpiler
- full list here and here (with pictures)
Almost 2 years ago comparison between Babel and Termi. Oh and yes, you can use Babel with WebStorm.
Note that every transpilers (CoffeeScript, TypeScript, Elm, Haxe, etc) suffer the same problem: compile duration (hey, one more thing to do [=minify] before testing/deploying) and hard debugging (easier if you use source maps, only for JS transpilers, I don't know if these things exists for transpiler for other language). Still I wish for wAsm to come faster. Btw I learned ES6 just for react-native-web, otherwise I would always still stick with ES5.
2016-12-08
Programming Language Libraries
Woot woot! I found a website that crawls for libraries *__*)b
And I think it awesome that Go got first rank.
By Language/Editor
By Package Manager, note:
go (go get), npm (js), rubygems (ruby), maven (java), packagist (php), pypi (python), nuget (.net, c#, vb.net, and f# mostly), bower (js), wordpress (php), cpan (perl), cocoapods (objective-c and swift), clojars (clojure), meteor (js), cran (r), hackage (haskell), atom (text editor), cargo (rust), homebrew (osx), emacs (text editor), swiftpm (swift), hex (erlang, elixir), pub (dart), sublime (text editor), platformio (iot), julia (julia), carthage (objective-c, swift), dub (d), haxelib (haxe), jam (js), elm (elm), alcatraz (xcode ide), nimble (nim), inqlude (qt), shards (crystal)
And I think it awesome that Go got first rank.
By Language/Editor
By Package Manager, note:
go (go get), npm (js), rubygems (ruby), maven (java), packagist (php), pypi (python), nuget (.net, c#, vb.net, and f# mostly), bower (js), wordpress (php), cpan (perl), cocoapods (objective-c and swift), clojars (clojure), meteor (js), cran (r), hackage (haskell), atom (text editor), cargo (rust), homebrew (osx), emacs (text editor), swiftpm (swift), hex (erlang, elixir), pub (dart), sublime (text editor), platformio (iot), julia (julia), carthage (objective-c, swift), dub (d), haxelib (haxe), jam (js), elm (elm), alcatraz (xcode ide), nimble (nim), inqlude (qt), shards (crystal)
2016-12-02
List of Tech Migrations
I'm quite fascinated with the decision (and obviously the effort) of leaving a language or database to another technology, here's the list that I found:
NOTE: this list will be no longer updated, you can see the lastest changes on github repo so anyone can contribute/update.
- Twitter (2011) from Ruby to Scala
- Urban Airship (2011) from MongoDB to PostgreSQL
- Mixpanel (2011) from Erlang to Python
- LinkedIn (2012) from Ruby to NodeJS
- MoovWeb (2012) from ? to Go
- NTP Pool (2012) from Perl to Go
- DLGoogle (2012) from C++ to Go
- Bitly (2012) from Python/C to Go
- SoundCloud (2012) from Ruby to Go
- SmartyStreets (2012) from .NET to Go
- Toggl (2012) from Ruby to Go
- Shareaholic (2012) from MongoDB to Riak
- DigiDoc (2012) from MongoDB to PostgreSQL
- Etsy (2012) from MongoDB to MySQL
- TekPub (2012) from MongoDB to PostgreSQL
- TargeterApp (2012) from NodeJS to Ruby
- PayPal (2013) from Java to NodeJS
- Koding (2013) from NodeJS to Go
- Iron.io (2013) from Ruby to Go
- Zalora (2013) from PHP to Go
- TimeHop (2013) from Ruby to Go
- Canonical Juju (2013) from Python to Go
- Instill (2014) from AngularDart to Polymer
- Workia (2014) from ActionScript to Dart
- TrustWave (2014) from ActionScript/Flex to Dart
- Facebook Chat (2014) from Erlang to C++
- Grab (2014) from Ruby/NodeJS to Go
- Auth0 (2015) from Apache Kafka to ZeroMQ
- Pinterest (2015) from Java to Elixir
- President University (2015) from PHP/MySQL to Go/PostgreSQL
- UserLike (2015) from MySQL and MongoDB to PostgreSQL
- Olery (2015) from MongoDB to PostgreSQL
- CrowdStrike (2015) from Scala to Go
- DockYard (2015) from Ruby to Elixir
- CrowdStrike (2016) from Scala to Go
- Tokopedia (2016) from Perl to Go
- Uber (2016) from PostgreSQL to MySQL
- Uber (2016) from NodeJS to Go and Java
- Uber (2016) from Python to Go
- Digg (2016) from NodeJS to Go
- Google AdWords (2016) from GWT to Angular Dart
- Bleacher Report (2017) from Ruby to Elixir
- UpGuard (2017) from JRuby to Go
- Movio (2017) from Scala to Go
- Discord (2017) from MongoDB to Cassandra
- Uber (2017) Riak/Solr to Cassandra
- Swat.io (2017) from MySQL to PostgreSQL
- Poki (2017) from PHP to Go
- Stream (2017) from Python to Go
- Baidu (2017) from MySQL to CockroachDB
- Boxzilla (2017) from PHP to Go
- Shippable (2017) from MongoDB to PostgreSQL
- GeekyAnts (2017) from ReactNative to Google Flutter (confirmed)
- AppTree (2018) from Java/Kotlin/ObjC/Swift to Dart
- SendGrid (2018) from Perl/Python to Go
- Bukalapak (2018) from Ruby/MySQL to Go/MongoDB/ElasticSearch
- Centrifugo (2018) from Python to Go
- The Guardian (2018) from MongoDB to PostgreSQL
- AppsFlyer (2019) from Clojure to Go
- Deliveroo (2019) from Ruby to Rust
- Amazon (2019) from OracleDB to Aurora Postgres and DynamoDB
- Two Fintech Giants (2019) from OracleDB to CockroachDB
- Comcast (2019) from Cassandra to ScyllaDB
- Codism (2019) from Python to Go
- Discord (2020) from Go to Rust
- HSBC (2020) from DB2 to MongoDB
- Unnamed US Wireless Carrier (2020) from Oracle to PostgreSQL
- ListenBrainz (2020) from InfluxDB to TimescaleDB
- Dropbox (2020) from Nginx to Envoy
- Repustate (2020) from Python to Go
- SimilarWeb (2020) from NodeJS to Go
- PayPal (2020) from C++ to Go
- KhanAcademy (2021) from Python to Go
- ownCloud (2021) from PHP to Go
- Percona (2021) from Prometheus to VictoriaMetrics
- Aluma (2021) from C# to Go
So many migrating to Go ^^. If it's not about migration, there's a lot more here that apparently choose Go (interviews, from X to Go, and also more here).
NOTE: this list will be no longer updated, you can see the lastest changes on github repo so anyone can contribute/update.
If you found any more news like this, paste the link on the comment, I'll gladly add them on the list.
2016-12-01
Faster than Go? Yes, plenty
Is there anything that faster than Go? yes, there are plenty, but I'm not sure if it would be fun to code with.. What are they?
G-WAN
G-WAN is closed-source web application server (not a language like Go). If I'm not mistaken G-WAN caches GET request, so second hit within few ms won't execute the backend function, practically this is cheating for benchmark (not merged), but for real application this feature quite great (can cope up with DDOS attack) :3 Btw did I mention that this web application server support whole lot of language? asm, C, C++, C#, D, Go, Java, Javascript, Lua, Objective-C, Perl, PHP, Python, Ruby, and Scala with CGI-like writing. One note that you must really learn how HTTP works (parsing header, setting cookie, parsing POST parameters, etc) if you want to use this.
I don't really know if this suffer the same problem similar to others that use CGI instead of FastCGI: connection pooling to database (but we can use pgpool).
LWAN
LWAN is also web application server that uses C, can be used with LuaJIT (fast implementation of Lua). For the framework you can use Sailor (Example).
PyParallel
PyParallel is a programming language implementation, forked from Python3, removes GIL (Global Interpreter Lock).
Julia
Julia is one awesome programming language that uses LLVM, it focuses
Actually there's a lot more implementation that faster than Go for certain (or all) cases, such as: C, C++, Ada, Rust, Java, and Fortran, be sure to check on BenchmarkGame site.
But, don't choose a language or web framework or web application platform just based on performance, there's a lot of things to consider, for example:
G-WAN
G-WAN is closed-source web application server (not a language like Go). If I'm not mistaken G-WAN caches GET request, so second hit within few ms won't execute the backend function, practically this is cheating for benchmark (not merged), but for real application this feature quite great (can cope up with DDOS attack) :3 Btw did I mention that this web application server support whole lot of language? asm, C, C++, C#, D, Go, Java, Javascript, Lua, Objective-C, Perl, PHP, Python, Ruby, and Scala with CGI-like writing. One note that you must really learn how HTTP works (parsing header, setting cookie, parsing POST parameters, etc) if you want to use this.
I don't really know if this suffer the same problem similar to others that use CGI instead of FastCGI: connection pooling to database (but we can use pgpool).
LWAN
LWAN is also web application server that uses C, can be used with LuaJIT (fast implementation of Lua). For the framework you can use Sailor (Example).
PyParallel
PyParallel is a programming language implementation, forked from Python3, removes GIL (Global Interpreter Lock).
Julia is one awesome programming language that uses LLVM, it focuses
Actually there's a lot more implementation that faster than Go for certain (or all) cases, such as: C, C++, Ada, Rust, Java, and Fortran, be sure to check on BenchmarkGame site.
But, don't choose a language or web framework or web application platform just based on performance, there's a lot of things to consider, for example:
- either it's waste of time to work with (since you must do many things manually aka there's no framework or so little libraries/function yet)
- how easy it's to train a new programmer to work with you or continue the project
- what's the continuity of the technology (if the project abandoned by the author/maintainer)
- build/compile duration
- etc..
2016-11-30
Websocket Benchmark
Once again, today I found another benchmark, about websocket:
Round #1
Round #2
You can see the raw result here.
Round #1
Language | Clients | RAM (MB) | RAM / Client (KB) | LOC | Library |
C++ | 33,000 | 600 | 18.62 | 140 | https://github.com/zaphoyd/websocketpp |
Clojure | 27,000 | 1,500 | 56.89 | 50 | http://www.http-kit.org/ |
Elixir | 24,000 | 1,900 | 81.07 | 20 | http://www.phoenixframework.org/ |
Go | 24,000 | 800 | 34.13 | 100 | Built-in golang.org/x/net/websocket |
NodeJS | 13,000 | 300 | 23.63 | 31 | https://github.com/websockets/ws |
JRuby | 1,100 | 650 | 605.09 | 20 | http://rubyonrails.org/ |
Ruby | 500 | 150 | 307.20 | 20 | http://rubyonrails.org/ |
Round #2
Language | Version | Thread | Clients | Clients (without Payload) |
Javascript / Node / uws | 6.6.0 | 26,000 | ||
Haskell - no chan | 1.2 | 25,000 | 37,000 | |
C++ / uWebSockets / RapidJSON | 5.4.0 | 1 | 24,000 | 35,000 |
Go / Websocket | 1.7 | 22,000 | 39,000 | |
C++ / Crow / RapidJSON | 5.4.0 | 1 | 20,000 | |
Go / Gorilla | 1.7 | 20,000 | ||
Java / Netty | 1.8.0_101 | 20,000 | ||
Rust - ws | 1.11.0 | 20,000 | ||
Elixir / Plug | 1.3.2 | 19,000 | ||
Java / Undertow | 1.8.0_101 | 19,000 | ||
NodeJS / Faye - clustered | 6.6.0 | 19,000 | ||
Rust - scopedpool-ws | 1.11.0 | 19,000 | ||
Clojure / Java | 1.8.0_101 | 18,000 | ||
C++ / WebsocketPP / jsoncpp | 5.4.0 | 8 | 17,000 | |
JRuby / Eventmachine | 9.1.2.0 | 17,000 | ||
Rust - threadpool-ws | 1.11.0 | 17,000 | ||
Elixir / Phoenix | 1.3.2 | 15,000 | ||
C++ / Crow / RapidJSON | 5.4.0 | 8 | 14,000 | 42,000 |
Javascript / Node / ws | 6.6.0 | 14,000 | ||
Javascript / Node / ws - clustered | 6.6.0 | 14,000 | ||
C++ / WebsocketPP / jsoncpp | 5.4.0 | 1 | 13,000 | |
Haskell | 1.2 | 13,000 | ||
NodeJS / Faye | 6.6.0 | 13,000 | ||
Ruby / Eventmachine | 2.3.1p112 | 13,000 | ||
Javascript / Node / uws - clustered | 6.6.0 | 12,000 | ||
JRuby / Rails | 9.1.2.0 | 1,000 | ||
Ruby / Rails | 2.3.1p112 | 500 |
You can see the raw result here.
2016-11-29
Sinatra-like Web Framework Benchmark
So today I come across some benchmark about sinatra-like web framework at 20 July 2016, it compares:
You can see the details here.
- Gin and Martini (Go 1.6.3)
- Phoenix and Plug (Elixir 1.3.2, Erlang/OTP 19.0.2)
- Express Cluster (NodeJS 6.3.0)
- Sinatra and Rails (Ruby MRI 2.3.1)
- Play (Scala / Java 1.8.0_51)
You can see the details here.
2016-11-28
Installing AeroSpike on ArchLinux
As benchmarked previously (more than half year ago since this blog post written), AeroSpike has awesome search/retrieval performance. In this tutorial we will learn how to install AeroSpike on ArchLinux
wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/tgz'
tar -xvfz aerospike.tgz
cd aerospike-server
./bin/aerospike init
Configure the etc/aerospike.conf into something like this:
service {
user YOUR_USERNAME
group YOUR_GROUP
run-as-daemon
paxos-single-replica-limit 1
pidfile /home/YOUR_USERNAME/aerospike-server/var/run/aerospike.pid
transaction-queues 8
transaction-threads-per-queue 8
transaction-pending-limit 255 # HOT KEY ERROR WORKAROUND FOR INCREMENT
proto-fd-max 15000
work-directory /home/YOUR_USERNAME/aerospike-server/var
}
logging {
file /home/YOUR_USERNAME/aerospike-server/var/log/aerospike.log {
context any info
}
}
mod-lua {
system-path /home/YOUR_USERNAME/aerospike-server/share/udf/lua
user-path /home/YOUR_USERNAME/aerospike-server/var/udf/lua
}
network {
service {
address any
port 3333 # USE DIFFERENT PORT IF CONFLICT
#reuse-address # COMMENT/REMOVE THIS PART
}
heartbeat {
mode multicast
multicast-group 239.1.99.222 # CHANGE address INTO multicast-group
port 9918
interval 150
timeout 10
}
fabric {
port 3331 # USE DIFFERENT PORT IF CONFLICT
}
info {
port 3332 # USE DIFFERENT PORT IF CONFLICT
}
}
namespace test {
replication-factor 2
memory-size 4G # CHANGE DEPENDS ON YOUR RAM
default-ttl 0 # CHANGE 30 days, use 0 to never expire/evict.
storage-engine device {
file /home/YOUR_USERNAME/aerospike-server/data
filesize 128M # MAX SIZE OF EACH FILE
}
}
Done, now you can test your aerospike server using any client :3
wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/tgz'
tar -xvfz aerospike.tgz
cd aerospike-server
./bin/aerospike init
Configure the etc/aerospike.conf into something like this:
service {
user YOUR_USERNAME
group YOUR_GROUP
run-as-daemon
paxos-single-replica-limit 1
pidfile /home/YOUR_USERNAME/aerospike-server/var/run/aerospike.pid
transaction-queues 8
transaction-threads-per-queue 8
transaction-pending-limit 255 # HOT KEY ERROR WORKAROUND FOR INCREMENT
proto-fd-max 15000
work-directory /home/YOUR_USERNAME/aerospike-server/var
}
logging {
file /home/YOUR_USERNAME/aerospike-server/var/log/aerospike.log {
context any info
}
}
mod-lua {
system-path /home/YOUR_USERNAME/aerospike-server/share/udf/lua
user-path /home/YOUR_USERNAME/aerospike-server/var/udf/lua
}
network {
service {
address any
port 3333 # USE DIFFERENT PORT IF CONFLICT
#reuse-address # COMMENT/REMOVE THIS PART
}
heartbeat {
mode multicast
multicast-group 239.1.99.222 # CHANGE address INTO multicast-group
port 9918
interval 150
timeout 10
}
fabric {
port 3331 # USE DIFFERENT PORT IF CONFLICT
}
info {
port 3332 # USE DIFFERENT PORT IF CONFLICT
}
}
namespace test {
replication-factor 2
memory-size 4G # CHANGE DEPENDS ON YOUR RAM
default-ttl 0 # CHANGE 30 days, use 0 to never expire/evict.
storage-engine device {
file /home/YOUR_USERNAME/aerospike-server/data
filesize 128M # MAX SIZE OF EACH FILE
}
}
Then start the server:
./bin/aerospike restart
tail -f var/log/aerospike.log &
./bin/aerospike status
First and last command should show something like this:
info: stopped
info: started
info: process running
Done, now you can test your aerospike server using any client :3
aerospike-tools only available on Debian, Ubuntu, and Redhat.
2016-11-25
How to become AUR package adopter?
AUR is ArchLinux User Repository, similar to Ubuntu's Launchpad.
To adopt an orphaned package it's easier than you think! adopt now :3
git clone ssh://aur@aur.archlinux.org/bla.git
# do some changes on PKGBUILD
git add .
git commit -m 'updated bla package to version X'
git push origin master
Done :3 you have successfully adopt and maintain a package :3
To adopt an orphaned package it's easier than you think! adopt now :3
What you need to do is register, find an orphaned package, then click on the "Adopt Package" link.
Don't forget to set your public key on your "My Account" menu.
After that you can clone the repository, see "Git Clone URL" on the first line of the package, edit and reupload:
# do some changes on PKGBUILD
git add .
git commit -m 'updated bla package to version X'
git push origin master
Done :3 you have successfully adopt and maintain a package :3
2016-11-24
Bootstrap Alternative
Today we're gonne see more alternative of css framework such as Bootstrap (and JQuery UI)
Semantic UI
Pure.css (by Yahoo)
Foundation
UIKit
How about a nice Editor for CSS?
EnjoyCSS (web based)
Stylizer (mac, 79$)
MacRabbit Expresso (mac, 75$)
Responsive Site Designer (windows, mac, 189$)
SimpleCSS (windows, mac)
Koala (windows, mac, linux)
if you have trouble running, do this:
sudo ln -s /lib64/libudev.so.1 /lib64/libudev.so.0
StyleMaster (windows, mac, 59$)
Rapid CSS Editor (windows, 29$)
EnginSite CSS Editor (windows, 109$)
HTML Pad (windows, 35$)
Forget about bootstrap, how about if I don't know anything about CSS at all?
CSS Reference
CSS Almanac
Flexbox CheatSheet
Learn CSS Layout
How to Learn CSS in 24 Hours
But what if I want more than just CSS Framework? I demand GUI! (warning: mostly slow load)
Qooxdoo
DHTMLX
Dojo Toolkit
KendoUI
WebIX
WinJS
W2UI
ExtJS ($4000+)
VueJS Components
ReactJS Components
B-b-but I like Bootstrap, is there any GUI Builder?
LayoutIt
BootPly
Brix.io (14$)
JetStrap
PineGrow (desktop, 25$+)
Pingendo (desktop)
BootstrapStudio (25$)
Bootstrap Website Builder (windows, mac)
Lavish (customize color theme from a picture)
BootsWatchr or BootstrapMagic or Cluckles (bootstrap realtime preview)
BootUI (mac, windows, 49$)
Frontenda
Mobirise Website Builder (windows, mac, 145$)
BootstrapEditor (templates)
CodePly
BootTheme
well, that's it for now.. btw here's a comic about fullstack~
Semantic UI
Pure.css (by Yahoo)
Foundation
UIKit
How about a nice Editor for CSS?
EnjoyCSS (web based)
Stylizer (mac, 79$)
MacRabbit Expresso (mac, 75$)
Responsive Site Designer (windows, mac, 189$)
SimpleCSS (windows, mac)
Koala (windows, mac, linux)
if you have trouble running, do this:
sudo ln -s /lib64/libudev.so.1 /lib64/libudev.so.0
StyleMaster (windows, mac, 59$)
Rapid CSS Editor (windows, 29$)
EnginSite CSS Editor (windows, 109$)
HTML Pad (windows, 35$)
Forget about bootstrap, how about if I don't know anything about CSS at all?
CSS Reference
CSS Almanac
Flexbox CheatSheet
Learn CSS Layout
How to Learn CSS in 24 Hours
But what if I want more than just CSS Framework? I demand GUI! (warning: mostly slow load)
Qooxdoo
DHTMLX
Dojo Toolkit
KendoUI
WebIX
WinJS
W2UI
ExtJS ($4000+)
VueJS Components
ReactJS Components
B-b-but I like Bootstrap, is there any GUI Builder?
LayoutIt
BootPly
Brix.io (14$)
JetStrap
PineGrow (desktop, 25$+)
Pingendo (desktop)
BootstrapStudio (25$)
Bootstrap Website Builder (windows, mac)
Lavish (customize color theme from a picture)
BootsWatchr or BootstrapMagic or Cluckles (bootstrap realtime preview)
BootUI (mac, windows, 49$)
Frontenda
Mobirise Website Builder (windows, mac, 145$)
BootstrapEditor (templates)
CodePly
BootTheme
well, that's it for now.. btw here's a comic about fullstack~
2016-11-17
Best Golang IDE: IntelliJ and VSCode
I've been using IntelliJ + go-lang-idea-plugin for years now (because it's currently the best one for almost everything: Ruby, PHP, Python, Javascript, SQL, you name it..), previously it's ok to use SublimeText + GoSublime, or LiteIDE, but today we got another completely working alternative that is also purely free (like IntelliJ Community): VisualStudioCode + lukehoban.Go. Here's how to install in ArchLinux:
yaourt --needed --noconfirm -S --force visual-studio-code
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
code
Then press Ctrl+Shift+P, type "Install Extension", type: "Go", done :3
Everything's works fine now:
In my opinion, IntelliJ still the best, but surely I'll be using VSCode when my IntellJ license ends.
yaourt --needed --noconfirm -S --force visual-studio-code
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
code
Then press Ctrl+Shift+P, type "Install Extension", type: "Go", done :3
Everything's works fine now:
In my opinion, IntelliJ still the best, but surely I'll be using VSCode when my IntellJ license ends.
2016-11-16
Techempower Framework Benchmark Round 13
After long wait, the latest Techempower Framework Benchmark 13 is out! And just like previous one, Go's fasthttp really really fast. As usual the most important thing is data updates benchmark:
Top ranker in this part (more than 1024 req/s) are Go, C++, Java, Javascript (NodeJS), Perl, C#, Elixir, Dart, Scala, Python, Clojure, and Groovy (Actually PHP are there below the last one on the picture with 1018 req/s). And for the database part would be: PostgreSQL, MongoDB, and MySQL.
Top ranker in this part (more than 1024 req/s) are Go, C++, Java, Javascript (NodeJS), Perl, C#, Elixir, Dart, Scala, Python, Clojure, and Groovy (Actually PHP are there below the last one on the picture with 1018 req/s). And for the database part would be: PostgreSQL, MongoDB, and MySQL.
2016-11-14
Crystal Internal Benchmark (Nov 2016)
Update the snapshot of benchmark by Kostya. See the previous (April 2015) snapshot here.
Havlak loop finder
Matrix multiplication
- gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
- Nim Compiler Version 0.14.0 (2016-06-06) [Linux: amd64]
- Crystal 0.19.2 [d81c32c] (2016-09-16)
- go version go1.7 linux/amd64
- gccgo (Ubuntu 4.9.1-0ubuntu1) 4.9.1
- DMD64 D Compiler v2.068.0
- gdc (crosstool-NG crosstool-ng-1.20.0-232-gc746732 - 20150830-2.066.1-dadb5a3784) 5.2.0
- LDC - the LLVM D compiler (0.15.2-beta1)
- V8 version 3.29.62 (candidate)
- rustc 1.11.0 (9b21dcd6a 2016-08-15)
- Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45)
- Nodejs v7.0.0
- PyPy 4.0.0 with GCC 4.8.4
- topaz (ruby-1.9.3p125) (git rev b95c858) [x86_64-linux]
- ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
- Python 2.7.6 and 3.5.2
- rubinius 2.2.10 (2.1.0 bf61ae2e 2014-06-27 JI) [x86_64-linux-gnu]
- jruby 1.7.20 (1.9.3p551) 2015-05-04 3086e6a on Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14 +jit [linux-amd64]
- jruby 9.0.0.0.pre2 (2.2.2) 2015-04-28 2755ae0 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [linux-amd64]
- Java version "1.8.0_45" Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
- julia version 0.4.3
- clang version 3.5-1ubuntu1 (trunk) (based on LLVM 3.5)
- Mono JIT compiler version 4.0.1 (tarball Tue May 12 15:39:23 UTC 2015)
- rock 0.9.10-head codename sapphire, built on Wed Jul 1 20:09:58 2015
- Felix version 15.04.03
- Q KDB+ 3.3 2015.09.02 Copyright (C) 1993-2015 Kx Systems
- perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
- The Glorious Glasgow Haskell Compilation System, version 7.10.2
- Tcl 8.6
- jq version 1.3
- Swift version 2.2-dev (LLVM ae2eb212e4, Clang ef4c02f431, Swift 634acb40a1)
- Kotlin version 1.0.3 (JRE 1.8.0_45-b14)
- PHP 7.0.9-1+deb.sury.org~trusty+1 (cli) ( NTS )
- .Net Core 1.0.0-preview2-003121
Havlak loop finder
Language | Time, s | Memory, MiB |
---|---|---|
Crystal | 15.46 | 443.2 |
Nim Gcc | 16.59 | 484.3 |
Nim Clang | 16.91 | 477.9 |
C++ | 17.72 | 174.5 |
D Ldc | 25.15 | 214.9 |
D | 28.90 | 418.2 |
Go | 31.26 | 349.9 |
D Gdc | 31.79 | 197.6 |
Scala | 32.18 | 363.0 |
Go Gcc | 32.94 | 365.7 |
C# Mono | 40.54 | 270.0 |
Python Pypy | 45.51 | 625.9 |
C# .Net Core | 61.38 | 388.8 |
Python | 396.54 | 724.0 |
Matrix multiplication
Language | Time, s | Memory, MiB |
---|---|---|
Julia Native Thr | 0.11 | 148.3 |
Julia Native | 0.31 | 175.8 |
D Mir GLAS | 0.32 | 56.7 |
D Ldc | 2.01 | 68.9 |
D | 2.30 | 71.3 |
D Gdc | 2.33 | 73.0 |
Python Numpy | 3.08 | 65.3 |
Java | 3.50 | 136.2 |
Scala | 3.62 | 136.2 |
Kotlin | 3.62 | 132.2 |
C | 3.64 | 69.2 |
Nim Clang | 3.73 | 142.3 |
Rust | 3.74 | 76.9 |
Nim Gcc | 3.82 | 146.0 |
Go | 3.83 | 73.5 |
Crystal | 3.85 | 73.9 |
Go Gcc | 3.90 | 84.5 |
Swift | 4.48 | 110.8 |
Javascript Node | 5.95 | 88.3 |
Javascript V8 | 6.87 | 81.5 |
Python Pypy | 7.68 | 122.6 |
C# .Net Core | 10.87 | 85.7 |
C# Mono | 15.17 | 83.6 |
Julia | 20.98 | 187.4 |
Ruby Topaz | 81.41 | 206.2 |
Ruby | 338.40 | 82.8 |
Python | 447.39 | 74.0 |
Ruby JRuby | 416.12 | 582.4 |
Ruby JRuby9k | 467.59 | 608.3 |
Ruby Rbx | 591.70 | 325.0 |
Perl | 666.46 | 604.1 |
Tcl | 1066.66 | 279.9 |
JSON parse
Language | Time, s | Memory, MiB |
---|---|---|
D Gdc Fast | 0.34 | 226.7 |
C++ Rapid SAX | 0.72 | 1.0 |
Rust Pull | 0.78 | 207.9 |
Rust Struct | 0.79 | 232.5 |
C++ Gason | 0.83 | 582.2 |
C++ Rapid | 0.94 | 243.6 |
Java | 1.47 | 621.2 |
Crystal Schema | 1.93 | 331.2 |
Rust Value | 2.51 | 1967.0 |
Perl XS | 2.68 | 888.4 |
Crystal | 3.00 | 1115.2 |
Javascript Node | 3.21 | 863.7 |
Crystal Pull | 3.30 | 1.6 |
Nim Clang | 4.12 | 1089.6 |
Python3 ujson | 4.15 | 1303.2 |
Nim Gcc | 4.46 | 1090.1 |
Python Pypy | 4.81 | 1553.0 |
Python ujson | 5.07 | 1352.9 |
Q | 5.18 | 684.0 |
Go | 5.21 | 479.3 |
C++ LibJson | 5.49 | 2796.3 |
Clojure | 5.81 | 1148.5 |
Python3 | 5.82 | 1037.8 |
C# .Net Core | 6.31 | 834.9 |
Php | 6.37 | 1502.0 |
Ruby YAJL | 8.23 | 1085.5 |
Haskell | 8.31 | 70.5 |
Python | 9.85 | 1409.1 |
C# Mono | 10.57 | 812.1 |
Julia | 11.89 | 2622.4 |
D | 12.42 | 1417.1 |
Ruby | 12.67 | 2013.9 |
JQ | 14.92 | 1714.5 |
Scala | 15.47 | 1415.8 |
C++ Boost | 16.44 | 2915.2 |
Ruby JRuby9K | 16.53 | 2050.5 |
Go Gcc | 17.64 | 473.1 |
Ruby JRuby | 21.98 | 2761.1 |
D Gdc | 25.86 | 926.1 |
D Ldc | 27.23 | 919.6 |
Perl | 46.02 | 1635.4 |
Ruby Rbx | 67.13 | 4681.0 |
Base64 encode and decode
Mandelbrot in Brainfuck
Language | Time, s | Memory, MiB |
---|---|---|
C aklomp SSSE3 | 0.93 | 32.3 |
C | 1.85 | 32.2 |
Crystal | 2.30 | 85.0 |
D Gdc | 2.52 | 33.3 |
Ruby | 2.73 | 125.3 |
D Ldc | 3.14 | 53.1 |
Perl XS | 3.63 | 47.9 |
Rust | 3.64 | 42.9 |
Ruby Rbx | 4.29 | 30.7 |
Nim Gcc | 4.62 | 52.7 |
Nim Clang | 4.70 | 52.7 |
Julia | 4.41 | 190.0 |
Javascript Node | 4.76 | 551.5 |
C++ Openssl | 5.45 | 65.2 |
Php | 6.34 | 53.4 |
C# .Net Core | 6.52 | 121.1 |
D | 7.18 | 55.3 |
Tcl | 7.20 | 66.0 |
Python Pypy | 7.32 | 582.3 |
Python | 7.62 | 52.6 |
Go | 8.00 | 70.0 |
Python3 | 8.13 | 54.5 |
C# Mono | 9.01 | 71.7 |
Java | 9.06 | 971.2 |
Kotlin | 9.75 | 932.9 |
Scala | 10.69 | 292.5 |
Ruby JRuby9K | 12.16 | 530.6 |
Ruby JRuby | 12.65 | 514.9 |
Perl | 33.30 | 99.7 |
Go Gcc | 39.56 | 185.5 |
Language | Time, s | Memory, MiB |
---|---|---|
C++ Gcc | 20.49 | 1.7 |
Crystal | 23.13 | 1.5 |
D Ldc | 24.90 | 1.4 |
Rust | 25.19 | 4.9 |
D Gdc | 29.49 | 2.4 |
Nim Gcc | 31.04 | 2.7 |
Nim Clang | 37.39 | 2.9 |
Go Gcc | 37.59 | 11.4 |
Kotlin | 40.79 | 34.9 |
Scala | 58.51 | 120.12 |
Java | 58.86 | 423.9 |
D Dmd | 62.69 | 1.7 |
Javascript Node | 88.34 | 18.6 |
Go | 102.85 | 2.2 |
Python Pypy | 126.47 | 78.9 |
C# .Net Core | 142.30 | 17.8 |
C# Mono | 147.69 | 12.6 |
Ruby Topaz | 305.79 | 38.8 |
Brainfuck interpreter
Language | Time, s | Memory, MiB |
---|---|---|
Kotlin | 1.78 | 28.4 |
C++ Gcc | 1.94 | 1.0 |
D Ldc | 2.02 | 0.9 |
Rust | 2.49 | 4.9 |
Nim Gcc | 2.56 | 0.7 |
D Gdc | 3.05 | 1.4 |
Nim Clang | 3.09 | 0.8 |
Scala | 3.43 | 120.12 |
Crystal | 3.46 | 1.3 |
Java | 4.03 | 513.8 |
Go Gcc | 4.20 | 10.0 |
D Dmd | 5.23 | 1.0 |
Go | 5.36 | 0.9 |
Javascript V8 | 6.53 | 7.9 |
Javascript Node | 7.38 | 16.9 |
C# .Net Core | 16.03 | 16.9 |
C# Mono | 19.86 | 14.6 |
Python Pypy | 20.64 | 77.9 |
Ruby Topaz | 59.53 | 36.5 |
Ruby Rbx | 120.38 | 32.3 |
Ruby Jruby | 129.75 | 267.6 |
Ruby Jruby9k | 134.18 | 286.8 |
Ruby | 181.44 | 7.2 |
Python | 314.79 | 4.9 |
Python3 | 412.13 | 5.5 |