[ 
https://issues.apache.org/jira/browse/DRILL-1854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Nadeau updated DRILL-1854:
----------------------------------
    Fix Version/s: Future

> reduce number of local variables in generated operators by reusing them
> -----------------------------------------------------------------------
>
>                 Key: DRILL-1854
>                 URL: https://issues.apache.org/jira/browse/DRILL-1854
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - Codegen
>            Reporter: Chris Westin
>            Assignee: Chris Westin
>             Fix For: Future
>
>
> Every time code gen inlines a function, it generates new temporaries for it 
> to use. The number of locals is getting very large for some functions -- I've 
> seen one case with about 300. But all of these locals are only referenced 
> within a single block. It appears that the java compiler (at least Janino) 
> does not reuse these (compare with a C/C++ compiler, which would reuse the 
> same stack space across blocks). We can be smarter about not generating new 
> temporaries, and just reusing compatible ones if they are already available 
> by maintaining a pool (map of Type to variable name) of available variables, 
> and borrowing from these during code generation as necessary.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to