Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSfPT-00BOuQ-8P for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jun 2025 17:20:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uSfPR-003FYX-BX for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jun 2025 17:20:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSfPR-003FYP-23 for pgsql-hackers@lists.postgresql.org; Fri, 20 Jun 2025 17:20:13 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uSfPP-003AOK-2P for pgsql-hackers@postgresql.org; Fri, 20 Jun 2025 17:20:13 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-7424ccbef4eso1697071b3a.2 for ; Fri, 20 Jun 2025 10:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1750440010; x=1751044810; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=hleEmEv42D9GMtn6L+opcGK9FMaPnzK65zNN1iFZf6Y=; b=E9iy8roA3uNTZ9VqHHOzA/VH6KEapWYmNBAsHEPBK0A1iRi6S4fPtAzR8VP75kWFSA mZMr24XbhK8zjcd7/YDb+BzXNHEm1LJVDaen6nd1RtmYbA9GPCu24FZACQD+3FdV+4PR XaDpjZDugwnW6OmxDbgTuEaxNFFSJGsk2RBI5dYTQGwbZdppMjwnvaalihkjT8mrNlzZ 6ztkDXfO7UnQ7UQqRDMqJUepYRY7S5hoygmMF/YrdalYPGTEe6GvXiD8Yeo1AaZc7rWS RVKskgQkgqwJv8wI5u4j3S9yyukX20H264/VYB1h7wMbTnwj9d2JekOgfIKKp8zyCx5L AgPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750440010; x=1751044810; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hleEmEv42D9GMtn6L+opcGK9FMaPnzK65zNN1iFZf6Y=; b=W7/Xmug1bsbyxIf0z7lPZmZqiw3IP86v98UbXCf4gZHeTcZUCB1HudB/ToewHUt7tb l0BZsqefgO9Oe459K/Qi0Sz3zmkJhKhIxwYgzyf4w9k5uQP+sLQoiv9pkLfLDPC6bScq Ha3myMqrrXIG2yZO2bxSp+qgGB4hffEQQMGwHkE4Bp/OaRKj0GuGonY6ljbWE/IljVdW e/vtZItwrBSTXUnB+RRImSgg1R/WiFaud3+HnzSb4TDRUvo0Y2tnJJgSo6Ib3+gEMB+Q M6hzM9RFk7IxZkjWVAyR3FvryVO83HyhVpJUdJ0FPwv3CoTSaWJQeMqBgyByMEnmJqsB DNtg== X-Forwarded-Encrypted: i=1; AJvYcCWlRlYWB2l9jbOuoPsNXEWz+6ATuF22qQ1Rn3bunEjpPmQcDoyN6PZ+ookYtIOnTShZYy+BQ/tBVA0U6vxp@postgresql.org X-Gm-Message-State: AOJu0YyLjPNRU2gtKFFO2PTEzKsKZRNXPeErhjAjzRR2k/RoIWRURp26 WLIG+F0FAsssUM4DKWxYttgIk2Sel3GMs9wnHi8p7lyBwuZRlmdkuX5xGDE834qV4HTd2OLq3uK qWTo= X-Gm-Gg: ASbGncv0PVVKUN1VM064xpkKkyVFtZpTe3O+hC2v3z8cRYzcaENZ7fAFJ+eZoQZVXqG ffxcRysWkB/jqhXvnBB8Zy2Bu2qxqCRHd4JwU3zeNW6yRt/zNGfifZ0IH23vrbIvYXYgEQv9Ve6 auXgcC7H+F8a/D+4JVmkqf2RfdNxer/qlYwj5A/RpWIHEs9Lc4GEfl3LL3xZ0lmVytExBw/s2kQ c1oex6SHQ9vQbePQ+MtV0uytqmeV45j02vYYttJ4SdN+0sC26DSp5gmeCVLmJcscd7UsuoNNqGX ZXyFJafQMf8JhjnzZc3pgbAXwaraqt3y6gzqAcgjsRZ+MmKIDhf6U2Mh3VnJ1/vua1GVouNcLdg ijrGQFcNR+o0d9zopCpEWIoMXNC8htBf6 X-Google-Smtp-Source: AGHT+IFrl5ySVW2MXTxziFHBNkV0t22pYsDatDyT/bHBt7afWD8vXSjYnBATdCXK4tKroYzgWgVJYw== X-Received: by 2002:a05:6a20:3d85:b0:215:d28e:8dc2 with SMTP id adf61e73a8af0-22026fb918fmr7735235637.31.1750440009595; Fri, 20 Jun 2025 10:20:09 -0700 (PDT) Received: from jeff-ws-bridge.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b31f126cc0asm2098517a12.76.2025.06.20.10.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jun 2025 10:20:09 -0700 (PDT) Message-ID: <96c54fc3dde2ebaccafbd1ffa29b8be1005c8b8c.camel@j-davis.com> Subject: Re: Improve the performance of Unicode Normalization Forms. From: Jeff Davis To: Alexander Borisov , PostgreSQL Hackers Date: Fri, 20 Jun 2025 10:20:08 -0700 In-Reply-To: <16f87504-f174-450e-93cc-2db1074522bb@gmail.com> References: <844d3dd7-2955-4794-95d1-7f4c13cb89fc@gmail.com> <4211ffd7fe154c4af693b98d78f4a3689ce8cc30.camel@j-davis.com> <16f87504-f174-450e-93cc-2db1074522bb@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.3-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-06-20 at 17:51 +0300, Alexander Borisov wrote: > I don't quite see how this compares to the implementation on Rust. In > the link provided, they use perfect hash, which I get rid of and get > a x2 boost. > If you take ICU implementations in C++, I have always considered them > slow, at least when used in C code. > I may well run benchmarks and compare the performance of the approach > in Postgres and ICU. But this is beyond the scope of the patches > under > discussion. Are you saying that, with these patches, Postgres will offer the fastest open-source Unicode normalization? If so, that would be very cool. The reason I'm asking is because, if there are multiple open source implementations, we should either have the best one, or just borrow another one as long as it has a suitable license (perhaps translating to C as necessary). Regards, Jeff Davis