crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Patel (JIRA)" <>
Subject [jira] [Created] (CRUNCH-639) Writable Bytes does an unnecessary copy
Date Fri, 10 Mar 2017 22:40:04 GMT
Stephen Patel created CRUNCH-639:

             Summary: Writable Bytes does an unnecessary copy
                 Key: CRUNCH-639
             Project: Crunch
          Issue Type: Improvement
          Components: Core
            Reporter: Stephen Patel
            Assignee: Josh Wills
            Priority: Minor

In the Writable.bytes() Output MapFn, an unnecessary (I believe) copy of the incoming ByteBuffer

BytesWritable bw = new BytesWritable();
bw.set(input.array(), input.arrayOffset(), input.limit()); <- copies the array

BytesWritable bw = new BytesWritable(input.array()); 


This message was sent by Atlassian JIRA

View raw message