Skip to content

Conversation

@ostcar
Copy link
Owner

@ostcar ostcar commented Oct 18, 2025

No description provided.

This gives an enormous performance boost. On the old version, the
bechmark looked like this:

BenchmarkPublishWithXReceivers1-16 189544	8121 ns/op
BenchmarkPublishWithXReceivers10-16 68542	17007 ns/op
BenchmarkPublishWithXReceivers100-16 12412	112008 ns/op
BenchmarkPublishWithXReceivers1000-16 2113	831531 ns/op
BenchmarkPublishWithXReceivers10000-16 188	8549041 ns/op
BenchmarkRetrieveBigTopic1-16 6755972	168.2 ns/op
BenchmarkRetrieveBigTopic10-16 482397	2880 ns/op
BenchmarkRetrieveBigTopic100-16 47083	25480 ns/op
BenchmarkRetrieveBigTopic1000-16 3550	309143 ns/op
BenchmarkRetrieveBigTopic10000-16 381	3162213 ns/op
BenchmarkRetrieveBigTopic100000-16 55	34077880 ns/op
BenchmarkRetrieveLastBigTopic1-16 9457071	150.3 ns/op
BenchmarkRetrieveLastBigTopic10-16 9307264	148.5 ns/op
BenchmarkRetrieveLastBigTopic100-16 7967427	159.4 ns/op
BenchmarkRetrieveLastBigTopic1000-16 7454274	157.1 ns/op
BenchmarkRetrieveLastBigTopic10000-16 7685139	156.2 ns/op
BenchmarkRetrieveLastBigTopic100000-16 11034918	103.3 ns/op

With this change, the same benchmark looks like this:

BenchmarkPublishWithXReceivers1-16 190663	6490 ns/op
BenchmarkPublishWithXReceivers10-16 92685	13557 ns/op
BenchmarkPublishWithXReceivers100-16 16966	71364 ns/op
BenchmarkPublishWithXReceivers1000-16 2110	614877 ns/op
BenchmarkPublishWithXReceivers10000-16 238	4942679 ns/op
BenchmarkRetrieveBigTopic1-16 74820468	15.96 ns/op
BenchmarkRetrieveBigTopic10-16 72618871	15.91 ns/op
BenchmarkRetrieveBigTopic100-16 72100257	15.92 ns/op
BenchmarkRetrieveBigTopic1000-16 77461323	15.64 ns/op
BenchmarkRetrieveBigTopic10000-16 76357166	15.53 ns/op
BenchmarkRetrieveBigTopic100000-16 76822623	15.62 ns/op
BenchmarkRetrieveLastBigTopic1-16 72182608	15.96 ns/op
BenchmarkRetrieveLastBigTopic10-16 76935794	15.98 ns/op
BenchmarkRetrieveLastBigTopic100-16 76762269	15.92 ns/op
BenchmarkRetrieveLastBigTopic1000-16 73140235	15.49 ns/op
BenchmarkRetrieveLastBigTopic10000-16 77611089	15.81 ns/op
BenchmarkRetrieveLastBigTopic100000-16 77758965	15.57 ns/op

This is not a backwords compatible change. In the old system, the values
returned from Receive where uniq. The new system returns the same data
tweice, if they where published twice.
@ostcar ostcar merged commit d945c9f into main Oct 18, 2025
2 checks passed
@ostcar ostcar deleted the slice-backend branch October 18, 2025 14:29
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.

2 participants