Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed optimization #6

Open
da0ka opened this issue Aug 20, 2021 · 0 comments
Open

speed optimization #6

da0ka opened this issue Aug 20, 2021 · 0 comments

Comments

@da0ka
Copy link

da0ka commented Aug 20, 2021

Most of case, compression is the same befor changed.

`//// Encoder.java ////
line 165 - 167 is changed to below.
for (int i=symbolIndex;i>0;)nodes[--i].frequency+=symbolCount[i];

//// CanonicalHuffmanTree.java ////
line 40 is changed to below
depths[lastOccurrence = i]=0;

line 50 is changed to below
newFreqs[index][depths[index]++] = frequency;

line 52 - 75 is removed`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant