Patch: boost flapjax 5 times faster

58 views
Skip to first unread message

Zang MingJie

unread,
Nov 21, 2011, 4:03:05 AM11/21/11
to fla...@googlegroups.com
I found the minimal heap implement in flapjax is ultra slow, it takes more than 85% running time. I modified the implementation, now it is about 15 times faster than then origin, and my program get 5 times faster.


flapjax.patch

Arjun Guha

unread,
Nov 21, 2011, 2:21:10 PM11/21/11
to fla...@googlegroups.com
I am not around this week, but you win. Consider the patch accepted. I'll apply and push it next week, after I return from my Thanksgiving vacation.

Arjun

Jacob Baskin

unread,
Nov 21, 2011, 8:27:45 PM11/21/11
to fla...@googlegroups.com
I bet a good JS compiler could find similar improvements and also reduce library size significantly. Have you guys considered distributing a compiled Flapjax library?

Aran Donohue

unread,
Nov 21, 2011, 9:57:13 PM11/21/11
to fla...@googlegroups.com
I'm curious, what benchmarks did you run to find this benefit? On what browser?

Aran

Arjun Guha

unread,
Dec 24, 2011, 11:44:08 PM12/24/11
to fla...@googlegroups.com
Working on it.

This commit shrinks flapjax.js from 48K to 22K** using jscompiler:


** I removed some dead code myself and added annotations for Closure, so the number isn't wholly accurate.

Arjun
Reply all
Reply to author
Forward
0 new messages