ABCDEFGHIJKLMNOPQRSTUVWXYZAA
1
Task
New NumberFormat code (ns)
Old NumberFormat code (ns)
% improvement
Times fasterNotes
2
Creation from a raw pattern string (no caching)117001440018.75%1.230769231
3
Format small int (31) using format(int, UErrorCode)330120072.50%3.636363636
4
Format 2.99792458E8 with 0.00000E04570560018.39%1.225382932
5
Format 4.6692016 with 0.00000002480345028.12%1.391129032
6
Format 2.1 with 0.00000001120345067.54%3.080357143
7
Format 3.0 with 0.00000001050345069.57%3.285714286
8
Format 2.01 with 0.00000002500345027.54%1.382.01 is often problematic for rounding, so does not use the fastpath
9
Format 1234567.8901 with 0.00000003650475023.16%1.301369863
10
Format "23.0 degrees Celsius" with MeasureFormat1800525065.71%2.916666667
11
Format "23 degrees Celsius" with MeasureFormat1850215013.95%1.162162162
12
Message Formatting: I have 1 friend; I have 3 friends.30502400-27.08%0.7868852459the slight performance hit here is likely in the fast track checking.
The new code has to call isZero() on DigitLists whereas
the old code checked if a pointer was NULL.
We can revisit if needed. Maybe add an isZero
boolean flag along side the DigitLists?
13
Message Formatting: I have 1.0 friend; I have 3.0 friends.3500540035.19%1.542857143
14
15
Converting 1234567 to DigitList300
16
Converting 1234567.8901 to DigitList1300
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100