erformance.now();
                
                // Allocate memory for query string
                let queryPtr;
                try {
                    queryPtr = stringToWasmPtr(query);
                } catch (e) {
                    // Fallback: use a fixed memory location
                    const queryBytes = new TextEncoder().encode(query + '\0');
                    const memoryArray = new Uint8Array(memory.buffer);
                    queryPtr = 1024; // Fixed offset
                    memo