hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brock Noland (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-5397) VectorizedRowBatch member variables are public.
Date Thu, 24 Oct 2013 14:18:03 GMT

    [ https://issues.apache.org/jira/browse/HIVE-5397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804234#comment-13804234
] 

Brock Noland commented on HIVE-5397:
------------------------------------

[~ehans] If we can show that it is faster, then I am totally fine with keeping this as is.
What evidence that the encapsulation causes performance overhead? 

Brian Goetz, an authority on the topic, writes items like the one below all over the web:
{noformat}
How can developers write Java code that performs well?

The answer may seem counterintuitive. Often, the way to write fast code in Java applications
is to write dumb code -- code that is straightforward, clean, and follows the most obvious
object-oriented principles. This has to do with the nature of dynamic compilers, which are
big pattern-matching engines. Because compilers are written by humans who have schedules and
time budgets, the compiler developers focus their efforts on the most common code patterns,
because that's where they get the most leverage. So if you write code using straightforward
object-oriented principles, you'll get better compiler optimization than if you write gnarly,
hacked-up, bit-banging code that looks really clever but that the compiler can't optimize
effectively.
{noformat}
http://www.oracle.com/technetwork/articles/javase/devinsight-1-139780.html

> VectorizedRowBatch member variables are public.
> -----------------------------------------------
>
>                 Key: HIVE-5397
>                 URL: https://issues.apache.org/jira/browse/HIVE-5397
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Jitendra Nath Pandey
>            Assignee: Jitendra Nath Pandey
>
> VectorizedRowBatch exposes members as public to avoid method call overheads. Alternative
is to rely on JIT to inline the methods. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message