Hey Floh

This document 
<https://github.com/achoudhury85/Similar-Function-Elimination/blob/master/Similar%20Function%20Elimination.pdf>
 covers 
Similar Function Elimination in detail. It is a more general version of 
DFE. The main difference between the two is that while in DFE we hash 
function bodies, in SFE, we first canonicalize the AST of the function body 
- we replace all identifiers and literals with placeholders, and then hash 
the function body. Functions whose canonicalized ASTs hash to the same 
value can be coalesced into helper functions (where the similar functions' 
bodies will be replaced by a call to the helper function). 

SFE can hence replace DFE and yields a larger reduction in code size than 
DFE. Hope this helps.

Regards,
Arnab

On Friday, August 18, 2017 at 1:24:15 PM UTC-7, Floh wrote:
>
> Nice to see progress in that area :) What are the differences to the 
> existing DFE pass? Since both are from you guys I guess the Similar 
> Function Elimination is an improvement over the Duplicate Function 
> Elimination? Is the new SFE supposed to replace DFE, or are they 
> independent from each other?
>
> Thanks!
> -Floh.
>
> Am Freitag, 18. August 2017 17:24:32 UTC+2 schrieb arnab choudhury:
>>
>> Hello Emscripten-Discuss
>>
>> I just wanted to bring folks' attention to a new post-build optimization 
>> pass for Emscripten generated asm.js called Similar Function Elimination 
>> (SFE) that Tableau recently open sourced. I discussed with Alon, and our 
>> thinking is that we will be adding this pass to Binaryen's web assembly 
>> generator. Given that everyone is moving to Web Assembly, we are thinking 
>> we may not add this pass back to Emscripten. However, that being said, the 
>> Emscripten community should feel free to use Similar Function Elimination 
>> on Emscripten generated asm.js if you need the additional size reduction. 
>>
>> https://github.com/achoudhury85/Similar-Function-Elimination 
>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fachoudhury85%2FSimilar-Function-Elimination&sa=D&sntz=1&usg=AFQjCNG5AJdGtjmIZoDEV-DXiCkMsox7LQ>
>>  
>>
>> At Tableau, we have observed up to 20% code size reduction when using SFE 
>> on template heavy codebases.
>>
>> Regards,
>> Arnab
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to