GitHub user greg-dove opened a pull request:

    https://github.com/apache/flex-asjs/pull/11

    Binary data improvement

    As per recent discussions - updated BinaryData improvements
    -this request fixes a bug in writeUTF that was not respecting the endian 
setting for the prefixed short value.
    - BinaryData now defaults to BIG_ENDIAN for consistency with flash:
    substantial performance improvements were achieved on Chrome (Windows 10) 
which mean that big endian is now as fast as little endian, which itself is 
also a little faster than before. (a test was done with unsigned bytes - 2 
separate loops of 100,000 with write and read in each, using preallocated 
buffers).  The alternate endian approach swaps out DataView with bitwise 
operators to rotate the byte order when necessary on read and write. In terms 
of other browsers, there was no obvious change on IE 11 and a slight 
degradation on Edge, FireFox had a degradation also. But the selection was made 
for bias towards performance on Chrome based on desktop browser market share. 
Big endian ops on Chrome are approximately 2.85x faster using the bitwise 
operator approach and virtually indisguishable from little endian mode.
    Endian.systemEndian provides the detection approach for detecting 
system/hardware endian (on js).
    Tests and doc comments were updated also.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/greg-dove/flex-asjs BinaryData_improvement

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flex-asjs/pull/11.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11
    
----
commit 641301b0c5a070ebf65b69cbf0a1dee9dcdb6b72
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-22T08:01:38Z

    [Improvement] Numerous updates to BinaryData to get closer to flash 
IDataInput and IDataOutput interfaces.
    Endian now detects default Endianness. IBinaryDataInput and 
IBinaryDataOutput interfaces added

commit 8a9b91b4bb3e8d56590546455704631de16bcdac
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-22T08:03:03Z

    [Test] Added swf-side unit tests for BinaryData changes (these also 
currently pass when mocked in the browser for the js version)

commit 3efcd71991b1383107e5c9ae3e0566941aa26dcd
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-22T08:05:10Z

    Merge branch 'develop' into improvement_Binarydata

commit d12bcddf444da559931b351fd4d93d7648e1758f
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-23T04:23:49Z

    Fix for UTC prepended short - respect endianness

commit 6288c2ddff4872464faa9bc6ce327e77730a47e1
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-25T03:20:33Z

    [Consistency] Set default Endian to BIG ENDIAN in javascript to be 
consistent with flash
    [Performance] optimization of int/unit/short read/writes to avoid using 
DataView, substantial gains

commit f791f02cf2f2cf4dcd25c6cae924923da20f0df1
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-25T06:14:17Z

    [Performance] instance level length var access adds a small speedup over 
requesting byteLength from the ArrayBuffer

commit febae6a6e2237abee1da67d14f98bce71e3f1792
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-26T03:02:27Z

    [Improvements] More performance tweaks, consistency tweaks, and doc 
improvements.

commit ae06cfddd63e0fae7197ba8c24bc74c8d5a3f383
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-26T03:10:50Z

    [Tests] Updated unit tests

commit c7bb721cd76985529b4dc0bb033ef5f2e96c5210
Author: greg-dove <greg.d...@gmail.com>
Date:   2016-07-26T06:20:01Z

    Merge branch 'develop' into improvement_Binarydata

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to