This examples demonstrate for pieces of code to convert a text into upper case. It is based on the discussion https://github.com/fortran-lang/stdlib/issues/703
This example demonstrate the use of the caller
functionality and casting into explicit interface.
The results are as follows:
Method Name | Mean | Standard Deviation |
---|---|---|
upper1(abcdefghijklmnopqrstuvwxyz) | 0.175 us | +/- 0.015 us |
upper2(abcdefghijklmnopqrstuvwxyz) | 0.203 us | +/- 0.016 us |
upper3(abcdefghijklmnopqrstuvwxyz) | 0.139 us | +/- 0.008 us |
upper1(ABCDEFGHIJKLMNOPQRSTUVWXYZ) | 0.161 us | +/- 0.010 us |
upper2(ABCDEFGHIJKLMNOPQRSTUVWXYZ) | 0.175 us | +/- 0.016 us |
upper3(ABCDEFGHIJKLMNOPQRSTUVWXYZ) | 0.181 us | +/- 0.016 us |
upper1(Lorem ipsum dolor sit amet, consectetur | 2.587 us | +/- 0.305 us |
upper2(Lorem ipsum dolor sit amet, consectetur | 3.512 us | +/- 0.266 us |
upper3(Lorem ipsum dolor sit amet, consectetur | 2.544 us | +/- 0.214 us |