BewareMyPower commented on PR #24463: URL: https://github.com/apache/pulsar/pull/24463#issuecomment-4287147569
Updated benchmark can be found here: https://github.com/BewareMyPower/JavaBenchmark/actions/runs/24712104796/job/72279087737 ``` TopicNameBenchmark.testConstruct thrpt 101.457 ops/s TopicNameBenchmark.testLegacyConstruct thrpt 36.061 ops/s ``` my local run: ``` TopicNameBenchmark.testConstruct thrpt 133.459 ops/s TopicNameBenchmark.testLegacyConstruct thrpt 53.429 ops/s ``` It's 2.5x ~ 2.8x faster. Actually, the performance is also affected by the slow `NamespaceName#get` call. I tried removing the `namespace` field from both `LegacyTopicName` and `TopicName` and ran the benchmark again, the result is: ``` Benchmark Mode Cnt Score Error Units TopicNameBenchmark.testConstruct thrpt 526.592 ops/s TopicNameBenchmark.testLegacyConstruct thrpt 73.782 ops/s ``` It's 7x faster -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
