On 5/4/19 6:21 PM, Giuliano Belinassi wrote:
> Hi
> 
> On 04/30, Jeff Law wrote:
>> On 4/30/19 8:00 AM, Jakub Jelinek wrote:
>>> On Tue, Apr 30, 2019 at 07:57:20AM -0600, Jeff Law wrote:
>>>>> Just curious, do we want to add math identities like above to match.pd ?
>>>> I'd think so.
>>>>
>>>>
>>>>> In practice, I am not sure how often we'd see  "tanh * cosh" instead
>>>>> of sinh directly in source,
>>>> We're often surprised when what ultimately shows up in sources :-)  And
>>>> a transformation that allows us to turn two transcendentals and a
>>>> multiplication into a single transcendental  is going to be a big win.
>>>
> 
> I wonder why these kind of optimization are not in the EasyHacks page.
I doubt anyone has really thought about them.  It's certainly
appropriate to add more stuff to that page ;-)

> It is somewhat easy to add it and can give huge performance
> improvements.
Agreed.

> 
> There is a blogpost that I wrote about the previous patches I submitted
> here. I tried to be didadic, discussing from the mathematical
> standpoint, to floating point numbers, and GCC implementation.
> Although there may be several english errors, I think it is still
> useful:
> 
> https://flusp.ime.usp.br/gcc/2019/03/26/making-gcc-optimize-some-trigonometric-functions/
Thanks.  It's funny you mention high school math, I had to do a fair
amount of refreshing when we were working on your patches ;-)

jeff

Reply via email to