1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Cut the speedtest1 runtime of the OPFS VFS proxy by approximately 3/4ths via xRead/xWrite buffer-copying optimizations. Still slower than the WASMFS impl by approx. 1/5th.

FossilOrigin-Name: fb7f287310d74a3e236125ae9c49b859f9263c29ae85161c1bcf9dd0778d8a51
This commit is contained in:
stephan
2022-09-19 17:09:09 +00:00
parent 61418d5a67
commit f815011a08
7 changed files with 107 additions and 27 deletions

View File

@@ -603,6 +603,10 @@ self.WhWasmUtilInstaller = function(target){
out) the pointer's value, else it will contain an essentially
random value.
ACHTUNG: calling this often, e.g. in a loop, can have a noticably
painful impact on performance. Rather than doing so, use
heapForSize() to fetch the heap object and read directly from it.
See: setMemValue()
*/
target.getMemValue = function(ptr, type='i8'){
@@ -633,6 +637,10 @@ self.WhWasmUtilInstaller = function(target){
this function behaves as if the 3rd argument were `i32`.
This function returns itself.
ACHTUNG: calling this often, e.g. in a loop, can have a noticably
painful impact on performance. Rather than doing so, use
heapForSize() to fetch the heap object and assign directly to it.
*/
target.setMemValue = function f(ptr, value, type='i8'){
if (type.endsWith('*')) type = ptrIR;