I took the liberty to do a very simple performance comparison between the master and this PR. The test was extremely simple and mostly directed toward measuring the decoding performance and the performance of pulling out the EU TCF string out of GPP string. The test was done using the JMH.
I used 2 different consent strings for this: the one from the Readme.md and a random real GPP string generated by the real CMP in Europe. I'll call those short and long GPP string accordingly.
Pure decoding is meaningless now, as nothing happens before anything is requested from the object. However, the TCF EU extraction performance is much better. And apart from the huge overall performance improvement, the performance degradation with real-world GPP string is gone.
The test was done on an Apple Macbook M2 Pro. It's not scientific in any way though and was done purely for comparison.
I took the liberty to do a very simple performance comparison between the
master
and this PR. The test was extremely simple and mostly directed toward measuring the decoding performance and the performance of pulling out the EU TCF string out of GPP string. The test was done using the JMH.I used 2 different consent strings for this: the one from the Readme.md and a random real GPP string generated by the real CMP in Europe. I'll call those short and long GPP string accordingly.
The current master
Please notice the huge performance degradation when transitioning from the example GPP string to a real-world GPP string.
This PR
Pure decoding is meaningless now, as nothing happens before anything is requested from the object. However, the TCF EU extraction performance is much better. And apart from the huge overall performance improvement, the performance degradation with real-world GPP string is gone.
The test was done on an Apple Macbook M2 Pro. It's not scientific in any way though and was done purely for comparison.