dapp-store-contracts icon indicating copy to clipboard operation
dapp-store-contracts copied to clipboard

EternalDB.delete_entry operates at O(n) complexity

Open pipermerriam opened this issue 10 years ago • 0 comments

Have you measured at which length an attribute array must be in order to exceed the pi-million gas limit?

An alternative to this would be to replace the element at the deleted index with the last element in the array and then shorten the array by 1. This would change this to be a constant time operation.

pipermerriam avatar Nov 17 '15 03:11 pipermerriam