]> git.gir.st - VimFx.git/commit
Enhance performance
authorSimon Lydell <simon.lydell@gmail.com>
Tue, 30 Jul 2013 22:00:21 +0000 (00:00 +0200)
committerSimon Lydell <simon.lydell@gmail.com>
Tue, 30 Jul 2013 22:00:21 +0000 (00:00 +0200)
commit16e273944c8841c572ddc9b4e026d48e4107cb4a
tree5e8705cb4a90f2201a71097c90f83b52134aceac
parent515f0a4bb9153019d556ef6ffd9cdd0e6453530b
Enhance performance

Instead of sorting the whole array of elements in each iteration of the
huffman tree construction, we now search backwards for the first index
where the sum to insert is equal to or greater than the weight at that
index. Directly after that index the sum is inserted. According to some
tests I made, this is about 3 times faster than before.
extension/packages/huffman.coffee
Imprint / Impressum