drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Westin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-1854) reduce number of local variables in generated operators by reusing them
Date Fri, 12 Dec 2014 19:56:13 GMT
Chris Westin created DRILL-1854:
-----------------------------------

             Summary: 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: Bug
          Components: Execution - Codegen
            Reporter: Chris Westin


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)

Mime
View raw message