10000 refactor: more memory efficient algorithm for SubscriberList by dunglas · Pull Request #697 · dunglas/mercure · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: more memory efficient algorithm for SubscriberList #697

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

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

dunglas
Copy link
Owner
@dunglas dunglas commented Sep 2, 2022

Follows #694. This ad hoc algorithm uses less memory and is easier to debug.

Comparative benchmark:

New algo:

BenchmarkSubscriberList-8   	  153007	      6932 ns/op	   20152 B/op	      61 allocs/op
PASS
ok  	github.com/dunglas/mercure	1.303s

ASCII 85 algo:

BenchmarkSubscriberList-8   	  152517	      7456 ns/op	   20160 B/op	      61 allocs/op
PASS
ok  	github.com/dunglas/mercure	1.359s

@dunglas dunglas force-pushed the refactor/subscriber-list-encoding branch from 2ffe299 to 2303b4f Compare September 2, 2022 20:45
@dunglas dunglas merged commit bc05353 into main Sep 6, 2022
@dunglas dunglas deleted the refactor/subscriber-list-encoding branch September 6, 2022 10:15
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

Successfully merging this pull request may close these issues.

1 participant
0