We have been using icu 56. Just upgraded to icu 63 and found that it is almost taking double time in smaller performance tests of our application.
For larger runs time is 50% increased.
Mostly it is date formatting but we observed UnicodeString constructor is also taking more time.
I worked on this part of the code in
I was able to get the .format() method on SimpleDateFormat to actually improve performance between 61 and 62. However, this came at the expense of the constructor. The performance regression only happens if you "create and destroy" a SimpleDateFormat.
That's a good point. The sample code provided was creating and destroying the SimpleDateFormat object repeatedly in a loop.
If you could hoist the creation of the object outside of any loops, then the performance would likely improve.
We did that for SimpleDateFormat. I modified this test application to use only UnicodeString and performed find and concatenation.
ICU61 performed better than ICU63. In next test I just increased the operations and did not create any new object of UnicodeString. ICU63 performed better here.
So constructor of UnicodeString is also taking extra time in ICU63. This in unavoidable.
If the UnicodeString constructor is slow, you might be performing a charset conversion. Can you change the lines that read
to instead read
with the u"" syntax, and see if that improves the performance?
Unassigned as this a general performance issue and isn’t specifically related to Visual Studio.