Re: Subject class creation performance optimization oportunity

2025-06-27 Thread Wei-Jun Wang
Hi Tigran, Thanks for your interest on OpenJDK. I think the timing difference makes sense as the principals are stored in a special set inside the subject so subjectByPassingSet adds each twice and the subjectByAddingToSet only once. As for why we don't just use the pre-populated set as-is sin

Subject class creation performance optimization oportunity

2025-06-26 Thread Mkrtchyan, Tigran
Dear security-devs, While benchmarking various parts of our code, I noticed unexpected (but fully explainable) behavior of how an instance of the Subject class can be created. The intuitive one is to create a set of Principals and then pass it to the constructor. However, it turned out that cr

Subject class creation performance optimization oportunity

2025-06-26 Thread Mkrtchyan, Tigran
Dear security-devs, While benchmarking various parts of our code, I noticed unexpected (but fully explainable) behavior of how an instance of the Subject class can be created. The intuitive one is to create a set of Principals and then pass it to the constructor. However, it turned out that cre