Re: Supporting object types in BCMath

From: Date: Mon, 18 Mar 2024 00:05:18 +0000
Subject: Re: Supporting object types in BCMath
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-122674@lists.php.net to get a copy of this message
Hi Jordan, > 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. I just sent an email, and you're right about performance. Therefore, the point of this proposal seems to be simply to improve convenience. Regards. Saki

« previous php.internals (#122674) next »