hive-dev mailing list archives

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


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:
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

> VectorizedRowBatch member variables are public.
> -----------------------------------------------
>                 Key: HIVE-5397
>                 URL:
>             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

View raw message