What is the status of fixing nio Buffer performance?

The performance of nio Buffers is very slow in comparison to primitive arrays. Does anyone know the status for getting this fixed? For performance sensitive code, Buffers are currently unacceptable.
Several Bugs were open regarding this issue, but they have all mysteriously been closed without resolution?
(Bug ID: 4411600, http://developer.java.sun.com/developer/bugParade/bugs/4411600.html)
Any insight would be appreciated.

Here are numbers using the code from the Bug reference I posted above.
(Bug ID: 4411600, http://developer.java.sun.com/developer/bugParade/bugs/4411600.html)
The only change I made was to the main() function so I could run tests multiple times to see if Hotspot would kick in at some point.
Here is the change I made. Replaced the original main() function with the following:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public static void main(String[] args) {
for ( int x = 0; x < 5; x++ )
System.gc();
System.out.println();
System.out.println( ">>>> run #" + x );
run();
public static void run()
timeArray();
time("heap", ByteBuffer.allocate(SIZE));
time("direct", ByteBuffer.allocateDirect(SIZE));
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Btw, I am running this under Win2k.
The results follow.
D:\dev\parse>java -server Bench3
run #0array 30
array rev 80
heap 51
heap rev 90
direct 601
direct rev 401
run #1array 40
array rev 40
heap 571
heap rev 661
direct 671
direct rev 290
run #2array 41
array rev 40
heap 550
heap rev 671
direct 591
direct rev 291
run #3array 40
array rev 50
heap 551
heap rev 661
direct 590
direct rev 300
run #4array 50
array rev 51
heap 561
heap rev 651
direct 581
direct rev 291
D:\dev\parse>java -client Bench3
run #0array 181
array rev 190
heap 380
heap rev 390
direct 791
direct rev 701
run #1array 180
array rev 180
heap 861
heap rev 802
direct 731
direct rev 711
run #2array 180
array rev 180
heap 1202
heap rev 721
direct 721
direct rev 971
run #3array 200
array rev 180
heap 741
heap rev 731
direct 861
direct rev 821
run #4array 180
array rev 210
heap 911
heap rev 721
direct 741
direct rev 741
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
But after taking a closer look at the code I realized that both the heap and direct buffers were being run through the same sum() and reverse() methods, so maybe Hotspot's inlining policy avoids keeping more than one specialized version of a function cached?
So I re-ran the benchmark, but only running time("heap"...) and time("direct",...) one at a time. I will not bother posting the numbers, but this time array, heap, and direct were all roughly equivalent.
So depending on the scenario, maybe it is not as bad as I though?
To try another variant, I replaced all calls to bb.get(j) with bb.get(), thinking this may be an opportunity for Buffer to be faster than array, since no start-of-buffer bounds check should be necessary (can only iterate forward).
But even running heap and direct separately, the test yielded slow numbers that suggest no inlining was performed again?
So I'm not sure what to think? I would like to use Buffers over primitive arrays, but I have no certainty of the performance characteristics of Buffers? They may run fast, or they may run very slow, depending on the scenario and which functions are used.
Here are the numbers after replacing calls bb.get(j) with bb.get().
D:\dev\parse>java -server Bench3
run #0array 41
array rev 80
heap 271
heap rev 381
run #1array 40
array rev 50
heap 231
heap rev 321
run #2array 40
array rev 40
heap 241
heap rev 321
run #3array 40
array rev 50
heap 231
heap rev 321
run #4array 40
array rev 40
heap 231
heap rev 320

Similar Messages

  • What is the status of Arch64

    What is the status of arch64 is it as stable as 32 bit arch distribution?
    What possibilities there are that makes arch64 able of running 32bit programs(especially 32b firefox with flash plugin)?

    creatid wrote:
    I am using 64bit firefox + flash without any issues. No 32bit software at all on my boxes.
    The only thing that I can't use yet is Skype. I can live without it because I can use my PSP for that :-)
    And Wine has no 64bit version yet, but so far I have no need for it.
    So for me the status of Arch x86_64 is: all systems go!
    frigaut wrote:yes, it works great. I run the 64 bits flash, and 32 bits skype with the 32 bits libraries.
    no significant issue. very stable. and, in my experience, faster than 32bits for heavy numerical calculations (even though you may not care and YMMV), which is important for my work.
    Guys:
    Following The Arch Way I usually do my research and try to resolve my own problems without bothering you with n00b questions, this way when I eventually found the way to fix that problems I post the explaination here so other green users like me can have it a little easier.
    Said that, I'm burned about making flash work (and usually multimedia) ok in KDE SC (4.4.3) on a Arch x64 system.
    Flash movies play well but with no audio when in GNOME -the other DE/WM I tried- flash run smooth. Any idea!? I installed flashplugin packet from extra, would help in any way using ndiswrapper?
    Running a fresh install of Arch x64 + KDE SC - installed yesterday, still tweaking some things.
    Last edited by martin77 (2010-05-15 17:03:46)

  • I have a 2013 macpro I upgraded to yosemite.  Now I find time machine does not work, nor my old back up using a click free wireless back up.  What is the status of time machine and yosemite?

    What is the status of time machine not working with yosemite?
    I upgraded mu mac pro to yosemite and since have found time machine does not work.
    Also, my old backup via a clikfree wireless backup does not work any longer.
    Is anyone working on this issue?
    Is there anyway I can backup my information today and until time machine &
    yosemite get fixed?

    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter the word "Starting" (without the quotes.) You should now see log messages with the words "Starting * backup," where * represents any of the words "automatic," "manual," or "standard."
    Each message in the log begins with the date and time when it was entered. Note the timestamp of the last "Starting" message that corresponds to the beginning of an an abnormal backup. Now
    CLEAR THE WORD "Starting" FROM THE TEXT FIELD
    so that all messages are showing, and scroll back in the log to the time you noted. Select the messages timestamped from then until the end of the backup, or the end of the log if that's not clear. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ If all you see are messages that contain the word "Starting," you didn't clear the text field.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. Don't post more than is requested.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.

  • What are the cause and fix for the following error message? NS_ERROR_FILE_ACCESS_DENIED failure code: 0x80520015

    Every time I close my Firefox browser I receive the following error message (see details below).
    FYI:
    -- I am running the current version of Firefox.
    -- I had no problems with this error message until my computer was recently attacked by 2 viruses:
    ` SystemFix
    ` Win7 Antivirus 2012
    Both viruses have since been cleaned from my computer. However, I am still receiving this error message.
    Here are my questions:
    * What are the cause and fix for this problem?
    * Do I need to uninstall and reinstall Firefox?
    * Is it possible that this error message is related to an add-on and that it has nothing to do with the recent virus attacks?
    I look forward to any feedback and support you might be able to provide.
    Thanks,
    Metta
    Error Message
    NS_ERROR_FILE_ACCESS_DENIED
    Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)
    [nsIFileOutputStream.init]
    File: undefined
    Line: 857
    Stack: undefined

    Every time I close my Firefox browser I receive the following error message (see details below).
    FYI:
    -- I am running the current version of Firefox.
    -- I had no problems with this error message until my computer was recently attacked by 2 viruses:
    ` SystemFix
    ` Win7 Antivirus 2012
    Both viruses have since been cleaned from my computer. However, I am still receiving this error message.
    Here are my questions:
    * What are the cause and fix for this problem?
    * Do I need to uninstall and reinstall Firefox?
    * Is it possible that this error message is related to an add-on and that it has nothing to do with the recent virus attacks?
    I look forward to any feedback and support you might be able to provide.
    Thanks,
    Metta
    Error Message
    NS_ERROR_FILE_ACCESS_DENIED
    Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)
    [nsIFileOutputStream.init]
    File: undefined
    Line: 857
    Stack: undefined

  • Good day actually i purchase second hand iphone from Swiss and we i try to open it in Egypt the phone showing it's locked as it was working in Swiss, so no one will help me like Apple it self just i want to know what is the way to fix this issue please?

    good day actually i purchase second hand iphone from Swiss and we i try to open it in Egypt the phone showing it's locked as it was working in Swiss, so no one will help me like Apple it self just i want to know what is the way to fix this issue please?

    You need to find out who the carrier was in Switzerland and see if they will unlock the device. The carrier with the lock is the only one that can authorize the unlock. You may need to check with the original owner and see if they can get it unlocked by the carrier if you do not qualify.

  • I don't understand correlation between ACL and dACL. If dACL is downloaded to the Catalyst switch what is the status of the ACL

    Understanding  ISE and dACL.
     I don't understand correlation between ACL and dACL.
     If dACL is downloaded to the Catalyst switch what is the status of the ACL attached to physical port. Is dACL appended to the existing ACL? When I typed ‘sh ip access-list int fa0/1’ I can see only dACL for access domain and dACL for voice domain appended to the previous dACL and no ACL lines.
     Regards,
    Vice

    Hi,
    Downloadable ACLs (dACL) are applied from your RADIUS server based on authentication and authorization policies.  It overrides any standard interface ACL.
    Standard interface ACLs are in place to limit traffic on the port before 802.1x or MAB authentication.
    When an authenticated session terminates on the interface the standard ACL will be re-applied until the next authentication.

  • What is the status of Quicken that will run in iOS5?

    What is the status of Quicken that will run on iOS5?

    http://quicken.intuit.com/support/help/is-quicken-software-compatible-with-the-i pad--ipod--iphone--or-android-/GEN83084.html
    http://quicken.intuit.com/support/help/install--register--and-convert/quicken-fo r-mac-compatibility-with-mac-osx-10-7-lion/GEN83208.html
    Parent Company
    https://www.mint.com/how-it-works/anywhere/iphone/

  • What is the status of Facetime repair?

    I have not been able to use Facetime for almost a week. What is the status?

    You can check the status of Apple Services here http://www.apple.com/support/systemstatus/

  • What is the status of AU 3.0? Upgrade to..? Supported ?

    What is the status of AU 3.0? Upgrade to..? Supported ?

    Sorry Mylenium, Adobe Audition 3.0 seems to be in some kind of Limbo with Adobe. Love the program, and was inquiring as to where it headed in the future.
    s
    Thanks to all those who serve
    Mike Marcum
    Audio Engineer
    Jewel Recording Studio

  • What is the status of the Moto X Android 4.4.4  update?

    What is the status of the Moto X Android 4.4.4 update?

    None of us customers know. The reps that roam this community forum won't know either.

  • What is the status pharse returned by expdp ?

    Hi Guys,
    In case of success, Expdp return "successfully completed".
    What is the status returned in case of warning and failure ?
    regards

    I am not looking at this level of precision, just the "line" shown by expdp at the end of logfile, that tells about export status (success, failure or success with warning) .
    example of last 3 lines in logfile (in case of success) :
    Dump file set for SECUREDMP.SYS_EXPORT_SCHEMA_01 is:
    /PRD/sgd/dpdump/exp_p01t_sgd.dmp
    Job "SECUREDMP"."SYS_EXPORT_SCHEMA_01" successfully completed at 08:38:49
    in this case , it is "successfully completed".

  • What is the status of the iPhone 6 plus 128GB pre-orders?

    Does anyone know the delivery status of the iPhone 6 plus 128GB pre-orders made within the first hour on the verizonwireless.com website?  I fully completed the process online for a silver iPhone 6 plus 128GB and received three indications of a 9/19 delivery date (an order summary webpage, an order confirmation webpage, and an order confirmation email with the correct phone upgrade order).  My online verizonwireless.com account doesn't show any orders (in the past 120 days), but when I put in the pre-order confirmation number and my last name I get the message "We received your order and it is in process. Expected Ship Date: Not available at this time"  During Friday and Saturday the date showed 10/14 (not even the 9/19 on the three confirmations).  The question is what is the real delivery date, and was the pre-order really even received?  Is there a Verizon rep online that might be able to check if I provide the necessary numbers and tell me what is the status of my pre-order?  Thanks anyone for any assistance.

    Thank you so much for that information! That is great news! And the first straight answer I've been able to find!! And it makes sense!! I was able to start my order around 2:57am and then with some confusion over losing my unlimited plan & having to choose a new one I probably didn't get the order in until around 3:15-3:20....But my confirmation email didn't come through until 4:55am and I know I was definitely done ordering the phone WAY before then! So I bet they did the first cut off at 4:55 then sent out confirmation emails for those who made the cut! Phew! It's all making sense now thanks to your information! I ordered the 6+ 128gb in gold btw and I can't wait, my 4s is still 3G and it's long overdue for retirement!!

  • What is the status for job in DBA_SCHEDULER_JOB_RUN_DETAILS if we stop runn

    Hi All,
    I'm going to create a monitoring script to monitor failed DBMS_SCHEDULER JOBS,
    i'm queering DBA_SCHEDULER_JOB_RUN_DETAILS, so i want to know what is the status for the JOB after i force job to stop when it is running?

    Status will be STOPPED with ERROR#0
    thanks you!

  • What are the main tables using in vendor performance report.

    what are the main tables using in vendor performance report.
    how many select statements are in ABAP reports.

    Refer the links -
    vendor performance report !!!
    vendor performance report
    vendor performance report
    I need standard vendor performance report
    Regards,
    Amit
    Reward all helpful replies.

  • What is the difference between personnel development and performance management

    Hi,
    What is the difference between personnel development and performance management in terms of configuration and in  portal level .
    Thanks
    Srikant

    HI Srikant,
    Personnel development is PD module where u can configure the qualification catalog with the proficiency which can be attached to the position or job as a requirement and the same can be attached to the person as a qualification and then you can do the profile matchup and find any qualification deficit and can propose any trraining required to impart the qualification.And also you can do succession planing, career planing and also development plan.
    Performance management is an appraisal cycle in a company . All appraisal process between manager and the employee will be taken care via portal with the appraisal template.(form)
    hope this will help you.
    regards,
    DInesh

Maybe you are looking for

  • Photoshop PDF resolution and color space difference: Acrobat vs. Photoshop?

    I have received several Photoshop PDFs from different sources. In Acrobat, the document properties indicate the PDF producer as Adobe Photoshop for macintosh -- Image Conversion Plug-in. When checking the image either with PitStop or through Photosho

  • I can't Tweet!

    Hi. When using the Twitter app, I can't post a tweet. I get an error message saying "Saved as draft. Error posting your message. There was an error sending your Tweet. It has been saved as a draft, please try resending later. (Error: forbidden)" Here

  • Authorizing and deauthorizing

    question: we purchased an ipod shuffle for our daughter while she was home on her college winter break. it was frustrating to set it up to say the least, some of that is our issue as we are not very tech-y people. she has a windows laptop, we have a

  • Restoring iPhone from backup using iTunes

    My wife upgraded her iPhone to iOS 5.  Unfortunately, she lost all her photos.  She says she used backup, however, while following the instruction on the Apple support, we back up once more.  Now, the only restore option is the latest one which doesn

  • Running windows xp applications on a macbook air

    I need to run some legacy windows xp applications in my new macbook air.  What version of windows 7 I need to use?