Quicr / numero-uri

BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Add some performance test #25

Open fluffy opened 1 year ago

fluffy commented 1 year ago

Load a bunch of templates then test performance of encode and decode

BrettRegnier commented 1 year ago

I've added the performance test in this commit

I'd like to keep this ticket open to outline what could be a problem.

Given the fact that the PEN number is no longer included in a URL this has a massive performance hit since now we can't utilize the map's complexity O(log n). Instead, we have to loop through each PEN and sub PEN, the complexity of O(n^2), resulting in a very slow lookup in the worst-case scenario as shown in the performance test.