Oddbean new post about | logout
 Cache shared key makes it 3X faster which I have done months ago. What I did just now was to not using scure to decode base64 to UintArray, instead, just use atob which is 20X faster. 
 Wow, is atob faster because it's native code? Why did they roll their own? 
 scure.js, at least the version I am using seemed to have a recursive implementation. Only nostr:nprofile1qqs8evfumcr8pevs7qkta84qlnc7qhkmchxg5syhx8a9gdjyqxqu78gpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhszxthwden5te0wfjkccte9e3xcmmhv96x2u3wv9c8qtcppemhxue69uhkummn9ekx7mp0fxcf3v  knows why.

nostr.ts 's original decrypt is copied from nostr-tools months ago. I remember that nostr:nprofile1qqs8evfumcr8pevs7qkta84qlnc7qhkmchxg5syhx8a9gdjyqxqu78gpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhszxthwden5te0wfjkccte9e3xcmmhv96x2u3wv9c8qtcppemhxue69uhkummn9ekx7mp0fxcf3v  has released new versions since then but I never bothered to update. Maybe it's now faster.

I am not sure if Alby uses the exact nostr-tools decrypt or not. 
 Alby has no dependency on nostr-tools last I looked. You should PR to scure, that would be a huge gain for a lot of people!