The microbenchmark result for spawning short-lived concurrent process:
# Go 1.8.0
$ go build test.go ; for k in 5 50 500 5000 50000 500000; do echo -n $k; time ./test $k > /dev/null; done
5
CPU: 0.00s Real: 0.00s RAM: 2080KB
50
CPU: 0.06s Real: 0.01s RAM: 3048KB
500
CPU: 0.61s Real: 0.12s RAM: 7760KB
5K
CPU: 6.02s Real: 1.23s RAM: 17712KB # 17 MB
50K
CPU: 62.30s Real: 12.53s RAM: 207720KB # 207 MB
500K # this is 10x more!
CPU: 649.47s Real: 131.53s RAM: 3008180KB # 3 GB
# Elixir 1.4.2 (erts-8.2.2)
$ for k in 5 50 500 5000 50000 ; do echo -n $k; time elixir --erl "+P 90000000" test.exs $k > /dev/null; done
5
CPU: 0.53s Real: 0.50s RAM: 842384KB # 842 MB
50
CPU: 1.50s Real: 0.62s RAM: 934276KB # 934 MB
500
CPU: 11.92s Real: 2.53s RAM: 1675872KB # 1.6 GB
5K
CPU: 122.65s Real: 20.20s RAM: 4336116KB # 4.3 GB
50K
CPU: 1288.65s Real: 209.66s RAM: 6573560KB # 6.5 GB
You can find the code here. In terms of performance and memory usage, it's not really, but you can argue about anything else.
programming: the action or process of writing computer programs. | rants: speak or shout at length in a wild, [im]passioned way.
2017-11-07
2017-07-31
Tricks to be Motivated
Recently I being so much unmotivated with my work, and I think I know the reason, but anyway, these are the generic things to get things done:
- Buy a pen, and small notebook, seriously! Make a TODO list, break into very small things to be done in a day
- Have enough sugar and sleep, lack of sleep/concentration/focus is bad, as bad as alcohol addiction
- Do your tasks first before doing unimportant tasks (facebook, tweeting, watching movies, etc), make those unimportant things as reward
- Do not imagine yourself reaching the success, probably better imagining if you are fail and be afraid of it
- Your willpower is unlimited, and can be strengthened by doing more things that requires willpower, as willpower is contagious
- Surround yourself with people with same goals, or at least watch motivational people that work hard to reach their goals/dreams, be envious!
- Forgive yourself, guilt makes you want instant gratification that produces more guilt
- Do less decision, always go for option A, be courageous, set simple rules
- Walk/start first, motivation will comes later
I think that's it, these article summarized from videos about motivation and willpower I found on youtube.
2017-06-14
Cross Platform Game Development
So I was looking for cross-platform game development, found some that are good for Indie game dev development, such as V-Play that uses QML (I like Qt), but the review for the games it produced is quite bad (crashes a lot), so I look another one and found Cocos2D-JS (that has been merged to Cocos2D-X at 2016). To start the development, visit the download page, and choose the full one. Start any web server on that directory.
Need more resource? You can watch this awesome youtube playlist (2014 but still quite relevant), or see the website (warning: mostly broken link) or github for more reference.
Or you might want to try, comparison:
Need more resource? You can watch this awesome youtube playlist (2014 but still quite relevant), or see the website (warning: mostly broken link) or github for more reference.
Or you might want to try, comparison:
- Godot (GDScript like Python; Web, Android, iOS, Console, Desktop) wikipedia youtube
- MonkeyX (Monkey like Basic; Web, Android, iOS, Console)
- Love2D (Lua; Web, Android, iOS, Desktop)
- GDevelop (Web, Desktop)
- CoronaSDK (Lua; Android, iOS, Desktop) wikipedia
- MonoGame (.NET; Android, iOS, Desktop) wikipedia
- WaveEngine (.NET; Android, iOS, Desktop)
- Duality (.NET; Desktop)
- Loom SDK (.NET; Android, iOS, Desktop)
- Starling (AS; Web, Android, iOS, Desktop) wikipedia
- Cocos2D-x (Lua, Js; Android, iOS, Web, Desktop) wikipedia youtube
Actually I want to write this page as Cocos2D tutorial, but for my current project I need engine that can run under a WebView component, so here's the alternative:
- SuperPowers HTML5 (Js; Web, Android, iOS, Desktop) youtube youtube youtube
- Phaser.io (Js, Ts: Web, Cordova, NWJS) youtube youtube youtube youtube youtube youtube youtube youtube editor
- Panda.JS (Js; Web) youtube
- CraftyJS (Js; Web)
- PixiJS (Js; Web) youtube youtube youtube youtube
- MelonJS (Js; Web)
- KiwiJS (Js; Web) youtube
- QiCiEngine (Js; Web) youtube
- StageJS (Js; Web)
- EnchantJS (Js; Web) youtube tutorial
- LimeJS (Js; Web) youtube
Subscribe to:
Posts
(
Atom
)