Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122671 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 9A5011AD8F6 for ; Sun, 17 Mar 2024 23:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1710719560; bh=JxDeCvCnTjXxAc5TNYmtHVx2JPahXCQT3TNkds9HW1M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nq3KY1RuRiZhZecLveI/SJ8XpyHrWwcUYi44Z0eEcYPgOjUSzndgLAeKIyj+tD5LE nK+wNB1YsGm//VeEP7MsqyxHf0n8oM3zJ9ZRsaN0xlGzkcyj2aAkFpd1Vp0WJIWhnw Yjm7prGBQ3+KdTUc/2LGbaDf/wxf/gIxEhxFlqwli6IPoeGOQpJoqKPDYwSkKkIMCM ju5qQIRWPEvRZRA3My4ZuNTZvQDInQ2hcss4/bDDwPMTF4ciAJP92pCJF26PJOp8B9 ytsTI7Qq6QruzIzBOj2bPqw62pmB/Z8HjO+xU0DXzJ4v9RhQs+u+UIuerZMKqjCljp mtnWyHg2ESApA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 06F6618062F for ; Sun, 17 Mar 2024 23:52:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 17 Mar 2024 23:52:36 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-29c7512e3b8so2959622a91.1 for ; Sun, 17 Mar 2024 16:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710719536; x=1711324336; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JxDeCvCnTjXxAc5TNYmtHVx2JPahXCQT3TNkds9HW1M=; b=DuW7DBJOp3c/XhmsqAWaGDN81QNEfYFvI02q/9+g7R9aDHYnv8froJLLOohknAm462 +z80WdFbG+odg2Kla5o6JBuWJqGfkfhG+gLEJkzuZGylOEsmlA66h8yz52WmW1uBfZ7f jvgxrPhaNZ7Ja6v7oVgRWA/90cANOC4ADsRAw/W0JQObeF7s5jJcxgjTyUgp0J4RUamm qN88J7GTcpePLpTaiI9wcVgBwsaIQlzt2cmrBNUCTkYIYj/iwGotTQ8tY86uRCYm0Hzp 8r7+3E9GJQ1fkphvHdIWIum9JKi3raSSk5KRaBz403gvHjSN6rqGEzwh3z52lPrwqDwt +uPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710719536; x=1711324336; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JxDeCvCnTjXxAc5TNYmtHVx2JPahXCQT3TNkds9HW1M=; b=SfuN+luJmRLrI+ZLx+PHVi18MLpl64ZdKGJvHlzF8RznSx52MwKniC1cyo362WC5+3 Et8UGd272JnuBj9jwD1uLq3L4nOID3Ak2KgvL7XvHvS2Rjv3nMjFCEp0pzGaMG4rkySl h7R9ts3pAquxMLJ0GxWmy3o7DzTzL7mT7Fm33os51j082u3Kz2FUNaLJEOgtQYYL9QdL dCzHiPewP7bOMprxMy3aeGu/axE5WdIttefRIMXA9+ezOWOtRqMRQlKdQcKoV2sdV866 PESecGTFIGrizbdV5rN4tXHBGkmugNP/gKHpBVAHy2q68EX6sHXYjmH6UYAkKlfAAjhK irNw== X-Forwarded-Encrypted: i=1; AJvYcCXNtC0sCRzPtxUcA1IYkZLPDxvYH5V3QbJf0Gm/OZ8YVu0rt6NcsnI8cFc4r7aKJ2EBzHEtNOq4QU2/JTk6tP+RMUtBVFyz4g== X-Gm-Message-State: AOJu0Yz4Cw29J9RIjNDKfF9EP1E7A0QnGbQeS+2i59omui6jrh6AbYfb jbePKbE5NX8WE5faCXcPpU4UbD9ihwzR/l6pdsxIaKVcC6NMKJXX+pOqm/yw5tXvOpHoYnu7dd2 aV8On2LXBMgxC0g6AJZYDXudozJM= X-Google-Smtp-Source: AGHT+IEKtoRgI1rvPwLernG5YPXd1XuctDnT7rygf7GrqeK99TiYcA8x8vXwnJrywhyykzFQgtFILn5Ok4KJMK8DdrQ= X-Received: by 2002:a17:90a:bf13:b0:29a:ce2b:7611 with SMTP id c19-20020a17090abf1300b0029ace2b7611mr8811214pjs.28.1710719535746; Sun, 17 Mar 2024 16:52:15 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <09F87F91-6538-48D2-9E34-0296E02CCC1A@sakiot.com> In-Reply-To: <09F87F91-6538-48D2-9E34-0296E02CCC1A@sakiot.com> Date: Sun, 17 Mar 2024 16:52:04 -0700 Message-ID: Subject: Re: [PHP-DEV] Supporting object types in BCMath To: Saki Takamachi Cc: Barney Laurance , internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000003d14880613e3ee35" From: jordan.ledoux@gmail.com (Jordan LeDoux) --0000000000003d14880613e3ee35 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Mar 16, 2024 at 8:39=E2=80=AFAM Saki Takamachi wr= ote: > Hi Barney, > > Thanks, that's what I was starting to worry about too. It seems like a > good idea to support only immutability, as you say earlier in your propos= al. > > Regards. > > Saki Using a BCNum inside a loop is the use case, where every loop would result in memory allocation for a new object, as well as the overhead of the constructor, etc. Granted, only people who REALLY know what they are doing should be doing this. Though my library which essentially IS a wrapped for BCMath that is upgradeable if you install other extensions (like ext-decimal) does support both, I suggest using primarily immutables in my docs. That said, the C library itself for BCMath is insanely inefficient as far as arbitrary precision math goes, so I would suggest that people don't get their hopes up too much on the performance front. Jordan --0000000000003d14880613e3ee35 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


--0000000000003d14880613e3ee35--