Skip to content

Conversation

@wsw0108
Copy link
Contributor

@wsw0108 wsw0108 commented Sep 19, 2016

To increase performance, when java method return large array of primitive types.

For now, the single way map are:

  • boolean of java -> Uint8Array of node
  • byte of java -> Int8Array of node
  • char of java -> Uint16Array of node
  • short of java -> Int16Array of node
  • int of java -> Int32Array of node
  • float of java -> Float32Array of node
  • double of java -> Float64Array of node
  • long of java -> N/A

@joeferner
Copy link
Owner

looks good to me, would you mind squashing your commits and I'll merge it in.

map Array(java) to TypedArray(v8)

change return type of util::newArrayBuffer()

Fix length of TypedArray

update a test for char array

use ArrayBuffer correctly under v0.12.x

Use original implementation under node v0.10/v0.12

workaround: check whether node support 'TypedArray'

fix workaround
@wsw0108
Copy link
Contributor Author

wsw0108 commented Sep 21, 2016

If this PR is going to be merged, then #357 will not needed

@joeferner
Copy link
Owner

manually merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants