Would you rather use libevent or libev?

Both provide the same basic functionality. Libevent is being worked on more at the moment (and is also in [core], iirc), while parts of libev have stagnated a bit (though it is a much smaller library).
The thing that bothers me is that the whole premise behind libev is that it's faster than libevent.. this claim doesn't really hold up under scrutiny. I built the latest libevent (2.0.3-alpha) and libev (3.9) sources and ran libev's bench.c* on it. On my arch64 laptop, libevent consistently wins handily.
* http://libev.schmorp.de/bench.c, was pulled and modified from the libevent test suite. The "ts" timeval struct seems to be the counter for libevent's routines, while "ta" is for libev. Libevent is finishing 100 to 150 usecs quicker than libev on my computer. I compiled with: gcc -O2 bench.c libev-3.9/ev.o libevent-2.0.3-alpha/*.o -lm -lpthread -lssl -lrt -o bench_test.
Please let me know if there's something wrong with the way I compared the two libraries. If you have any experience with either, I'd like to hear what you think of them.

The results are bogus - bench.c has to be linked against the library you want to test, and is not ABI-compatible with the default libev, so you have to compile in ev.c and event.c as well.
All you did was benchmark libevent against itself, and if you got different results, this is just variation (proof: it would segfault if it called the functions in ev.o).
If you compile two binaries you can run three benchmarks - libevent, libev+event API and libev+native API.
Then you will get the expected result, actually worse with libevent-2.0 when compiled with pthread-support, as it locks the loop on every single access, something not required by libev.

Similar Messages

  • Lion vs. Snow Leopard. What would you rather use?

    There has been debates about software upgrades. people are saying its not easy to use. blah blah blah. tell me what you think, and i wanna know why.

    No matter what you do, whether you switch OS's or not, always have a backup, preferably two.
    Asking which is better, lion or snow leopard is a loaded question.  Almost like religion.
    Personally I think Lion is a dumbed down version of OSX attempting to merge the ipad with OSX.  As you also discovered no Rosetta (ppc support).  Obviously you can tell I'm pro-snow leopard.
    Let the (religious) war begin...

  • None of any of the pictures on Facebook can be opened and seen on the website, I have absolutely no problem on Safari, but I would much rather use Firefox..What the heck is going on????

    About a week ago, I had no problem clicking on pictures to open them to bigger size.....As of about 4 days ago - If I try to open a picture on Facebook, it shows the comments but no picture..I don't know what is going on!!! It works fine on Safari, but I would much rather use Mozilla for my own selfish reasons, WHAT THE HECK IS GOING ON????? ( I'VE TRIED EVERYTHING!!!!!)
    == This happened ==
    Every time Firefox opened
    == About a week ago.....

    I agree the phones are supposed to come with the battery and battery door missing that is policy of every wireless company. The problem is that the rep that you spoke with wasn't being as thorough as they could have been to ensure that you got complete equipment, is was a processing error from the first representative. Most of the information for exchanging a phone is auto completed by the computers as well so when the rep processes the exchange they don't have any say so as to what is actually in the shipping box so being that you didn't activate the droid 3 on your account when you called in about the missing battery and complained the computer only recognized the droid x because that probably what you had activated on your account, so that's why the second replacement was droid x equipment and not droid 3

  • Mine is OS X Version 10.9.5. i got somany mails that yosemite is not prpoer! what would you suggest me? would you rather i upgraded to yosemite or not?

    mine is OS X Version 10.9.5. i got so many mails that Yosemite is not proper! what would you suggest me? would you rather i upgraded to Yosemite or not?

    That is your choice. We can't tell you what to do.

  • Would you rather...

    In your opinion, would you rather purchase an iPad Air or and iPad Mini with Retina Display?

    iPad Air vs. Retina iPad Mini: Which tablet is right for you?
    http://reviews.cnet.com/8301-31747_7-57610252-243/ipad-air-vs-retina-ipad-mini-w hich-tablet-is-right-for-you/
    16GB vs 32GB vs 64GB: Which new iPad storage capacity should you get?
    http://www.imore.com/2012/03/08/16gb-32gb-64gb-ipad-capacity/
    How much content will fit on my iPod or iPhone?
    http://support.apple.com/kb/HT1867
    How Much iPad Memory Do You Need?
    http://ipad.about.com/od/iPad-Tutorials/a/How-Much-iPad-Memory-Do-You-Need.htm
     Cheers, Tom

  • I'm a newbie - Would you recommend using jdeveloper to build my website?

    I am after some advice.
    I want to build a website which will have a members area and several other bits of server-side functionality.
    I have built 1 or 2 sites using dreamweaver - with PHP and MySQL.
    I could simply build the site with the above but am keen to learn new skills. I have no experience of Java, but I've been advised that I could possibly build my site using JDeveloper. Taking advantage of ADF.
    I have installed the most recent version of JDeveloper and a MySQL database.
    I have managed to set this up and connect to MySQL using the third party jdbc driver.
    Anyway could anybody please answer the following:
    1. If I build my site using jdeveloper with a mysql backend - is there anything I need to know in terms of getting the site hosted. Most hosts I have seen offer a MySQL database with either PHP or MySQL. What do I need to look for?
    2. Can anyone suggest any decent tutorials? I'm not sure if the learning curve is too steep. As I said I have no Java knowledge.
    3. Can anyone suggest any decent samples I can install/run? I found one on otn about a toy store but this required an Oracle backend rather than MySQL.
    4. Anyone other advice or words of wisdom....?
    Thanks

    Yes you can build Web sites with Java - and using JDeveloper and ADF will probably make it simpler for you.
    One thing you'll need is a server that will host a Java application.
    For a sample and a tutorial see the ADF Developer Guide and the SRDemo applicaiton.
    http://download.oracle.com/otn_hosted_doc/jdeveloper/1013/adfdevguide.pdf
    http://www.oracle.com/technology/products/jdev/samples/srdemo.html

  • When would you not use java

    This is a discussion I would really like to hear some other opinions about. I know some people who keep thinking Java sucks and when they try to use it, they use it for completely the wrong tasks. Now I was thinking, in what situations should you avoid it altogether? This could become a nice reference thread to point those idiots to :)
    I would avoid Java for:
    - performance critical solutions (perfect timing, per frame graphics analyzers, etc.)
    - general public applications. You have to install java first to run your software, which a lot of users will screw up or simply won't do. Java also eats up a lot of memory.
    - platform dependend problems. Generally if your problem description includes the word "Microsoft", you should NOT use Java to try and fix it. You should be using Visual Basic or C#.
    These are really common examples that I see on this forum almost every day. Are there any other examples that are worth mentioning?

    Q>>Now I was thinking, in what situations should you avoid it altogether?
    A>>When they use it for completely the wrong tasks.
    You answered your own question.
    I would avoid Java for:The stuff you say you would avoid java for, pretty much , well to me, says you won't use java.
    - performance critical solutions (perfect timing, per frame graphics analyzers, etc.)Why not, all depends on your algorithms.
    - general public applications. You have to install java first to run your software, which a lot of users will screw up or simply won't do. Latest Linux Distros, like JDS, come already packaged with JRE, so this isn't 100% true.
    Java also eats up a lot of memory. So does windoz OS. I guess I'll avoid it.
    - platform dependend problems. How so??? again see your original Question (Q above).
    Java was created for platform independance.
    When you create a program that considers Solaris, Linux, and cough windoz, Oh , don't forget MAC, you program each case, no big deal.

  • HT4859 Why would I rather use I cloud backup when transferring from iPhone 4 to iPhone 5

    Which is better to use to back up my iPhone 4 then transfer to iPhone 5. iTunes or iCloud.

    Faster and I believe more reliable.  However, be sure to sync photos to a computer before doing the switch. THAT is the safe way to transfer photos - too many users have gotten burned relying on getting back photos from an icloud backup.

  • It seems like each time I get a Firefox update (the latest being 5.0), it disables the virus protection software. I'm currently using McAfee SiteAdvisor and Rapport, which program would you suggest using with Firefox for virus protection?

    I'm using a Mac OSX platform for my computer system. Is there any reason why McAfee SiteAdvisor and Rapport virus protection software programs are not compatible with Firefox updates? What virus protection software is Mozilla suggesting to use with Firefox?

    Download the latest version of Trusteer Rapport from here: <br />
    http://www.trusteer.com/book/rapport-installation-links
    The McAfee Site Advisor is blocklisted in Firefox 5 due it being the #2 cause of crashes. McAfee is developing a new add-on, which is due to be ready in late July. See the McAfee forum for more information. <br />
    https://community.mcafee.com/message/195191#195191
    Try this add-on to replace the Site Advisor: <br />
    https://addons.mozilla.org/en-US/firefox/addon/wot-safe-browsing-tool/

  • Would you be willing to install WinXP using a floppy and driver w/ BootCamp

    I think Apple may be able to provide us full SATA compatibility quickly if they were willing to program the AHCI controller device in enhanced AHCI mode.
    This would require us to install (reinstall) windows and use a USB floppy to install the intel AHCI drivers, since they are not a part of WinXP. This is generally what users of the server-class Intel motherboards have to do if they want full SATA performance.
    Users who are not accustomed to WinXP installation may find this too difficult.
    Perhaps instead of a BIOS set up, Apple can provide an OS X utility that allows configuration of certain system resources. Many WinTel manufacturers provide similar utilities, to simplify BIOS setup. Such a utility would allow more advanced users to enable enhanced-AHCI mode, while the mess experienced users can continue to work in PIO mode.
    If you are interested in learning more about the Intel SATA controller in the WinTel environment, you can find more information in the following links:
    http://www.microsoft.com/whdc/device/storage/serialATA_FAQ.mspx
    http://www.intel.com/support/chipsets/imsm/sb/cs-021736.htm
    ftp://download.intel.com/design/chipsets/manuals/30144401.pdf (Not specific to the 5000X chipset, but AHCI is a standard across multiple intel chipsets)
    Mac Pro 2.66   Mac OS X (10.4.7)  

    The real problem with the Mac Pro and Windows right now is how it sets up the SATA controller device in the CSM, I believe.
    Apple can fix this one of 2 ways:
    1. Give us PATA emulation with full DMA support, but this does not give us SATA NCQ.
    2. Give us Enhanced AHCI support, with NCQ, but this requires us to install an intel driver at windows install time using a USB floppy.
    I believe #2 shouldn't be hard for apple to implement, but it makes Windows harder to install. That is why I called for an OS X application that lets the user choose which mode they want the SATA controller to run in.
    I included the links above as background material into the full problem, from how to program the device in a BIOS (or CSM) to installing the drivers.
    I am asking people, if Apple could provide a firmware update, would you be willing to install Windows again using a USB floppy and driver, or would you rather wait for PATA emulation with DMA support.
    I previously wrote a posting that describes this problem:
    I have spent a few days researching SATA, and how it is handled under Windows, especially Intel's implementation. Intel is pushing a standardized controller interface called AHCI. AHCI does support legacy PATA emulation. In WinTel platform, it is a requirement of the BIOS to configure the AHCI device properly. The AHCI PCI device will present different PCI subcodes depending if it is running in PATA or native mode. These PCI subcodes are used to choose the appropriate driver at boot time.
    For best performance, SATA wants to run in native mode which, on the Mac Pro platform, means running the controller device in AHCI mode. AHCI fully supports DMA as well as Native Command Queuing (NCQ). Combining these two technologies give the best performance.
    The PATA emulation can support DMA, depending on the actual BIOS implementation. PATA can not support NCQ.
    With Boot Camp, Apple is providing a BIOS layer on top of EFI, the new standard for low-level PC firmware. This layer is called a CSM (Compatibility Support Module). I believe the CSM is not programming the device to enter AHCI mode. Also, the CSM is not providing anything other than Programmed I/O (PIO or non-DMA) in their PATA emulation support.
    How do we work around this? I don't know. I am hoping to bring others into this discussion to see if we can figure something out. Considering Apple released Boot Camp 1.1 with the same flaw, I don't believe we can expect them to resolve this issue soon.
    Putting the device in AHCI mode may present more difficult problems for Apple. They will have to change their CSM to support loading the boot sector using AHCI instead of PATA protocols.
    There is one other thing to note, when you boot with device in AHCI mode, and then install Windows, you must install a 3rd party driver provided by Intel at installation time. Pressing the F6 key early on in the install process, inserting a floppy, which contains the driver, and then choosing the driver for installation. The CSM will have to support USB floppies (I have not tested to see if it does, yet). It also means that any user that currently has Windows installed will have to reinstall Windows once we determine how to put the device in AHCI mode.
    If we were willing to give up NCQ, it might be easier for Apple to extend their CSM to include better PATA emulation. We may be limited to 100MB/s, or 133MB/s at best. This is more than enough bandwidth to support any single drive.
    Various Intel Macs   Mac OS X (10.4.6)  

  • API design style I've never seen before - would you use it?

    I was Googling for examples of a "Bean Comparator" and came across this strange API design I've never seen before (is it just me?). I'm curious if you have seen it before and what you think about it?
    [http://cojen.sourceforge.net/apidocs/org/cojen/util/BeanComparator.html]
    The basic problem is to create a Comparator that can sort on multiple fields within a given class.
    First, a more traditional(?) API design might be something like:
    Constructor Summary:
         BeanComparator(Class theClass);
    Method Summary:
         addSortField(String fieldName, boolean isAscending, boolean isSortNullHigh);
         addSortField(String fieldName); // convenience method with default ascending and sortNullHigh
    So you could create a BeanComparator that sorts on multiple fields by using:
    BeanComparator bc = new BeanComparator(SomeClass.class);
    bc.addSortField("field1");
    bc.addSortField("field2", false, true);
    bc.addSortField("field3", true, false);Finally, without listing the API, the equivalent code for the "strange API design" would be:
    Comparator c = BeanComparator.forClass(SomeClass.class)
         .orderBy("field1")
         .orderBy("field2")
         .reverse();
         .orderBy("field3")
         .nullLow();So in this case:
    a) there is no explicit "add" method to add a new sort field. The "orderBy" is an implicit add.
    b) the reverse() and nullLow() methods only apply to the current orderBy field.
    c) the creation of the class is "sequential" in nature as each method needs to be invoked in the proper order
    In some ways this seems to simplify the API because you don't need lots of convenience methods or your don't need to use the full method and then restate the default values.
    Also you can add new sort options to the API without affecting any existing methods.
    What do you think of this type of API design?
    Have you ever used it before?
    Would you consider using this design and in what situations would you consider it?

    What part is bothering you exactly? Its not that it bothers me, its just that it is "different" and I was wondering if it is an acceptable design of a class and when you would use it, since I don't think I've seen any examples in the JDK.
    Usually the order of method invocation is not important. You can do:
    component.setFont()
    component.setBackground()or
    component.setBackground()
    component.setFont()However
    orderBy()
    orderBy()
    reverse()is not the same as
    orderBy()
    reverse()
    orderBy()So the API implies a "building" approach where you need to know you are building the components of the class in a certain order.
    Again, its not bad, its just different (to me) so I was wondering if it is common and when you would use it.
    The fact that the methods return the object itself...No, I've seen that pattern before and find it handy.
    Your example (addSortField) also depends on the order in which the methods are called.Yes, but this is normal for most APIs. For example adding items to a Vector, or components to a panel.
    In this case the orderBy() method implies a change of state because the next set of methods may or may not modify the state of the field being ordered.
    Again, I said I thought that this potentialy does simplify the API, but I have not seen it used before.
    I don't see the design as much of a problem. Me either.

  • Would you recommend installing and creating apps in the apex install schema

    Would you recommend installing and creating apps in the apex install schema for e.g. apex_040100? Or would you rather a separate tablespace be used for the application objects? In addition to this we are integrating it with Oracle EBS? Are there any industry best practices for creating tablespaces and schemas for apex applications?

    A BIG NO!!!, you should be using separate schema's
    Have you seen this http://www.oracle.com/technetwork/developer-tools/apex/learnmore/apex-ebs-extension-white-paper-345780.pdf

  • What would you have?

    I have the opportunity to get another Apple Mac Pro "Quad Core" 2.66 2gb memory. I have to replace it with something else though. Its my moms and she was doing some video editing a while back on it but has quit since then.
    I figured it would be great to have another Mac Pro so I planned on getting her a new Mac Mini. What would you rather have? A new Mac Mini or Apple Mac Pro "Quad Core" 2.66 that was introduced sometime in 06 or 07?

    What would you rather have? A new Mac Mini or Apple Mac Pro "Quad Core" 2.66 that was introduced sometime in 06 or 07?
    Other factors such as space availability and usage aside and considering only performance, I'd take the Mac Pro, no question. It'll run circles around any Mac mini and never break a sweat. For many people, though, that extra power isn't needed but the compact size of the Mac mini would be an advantage. For use as a media device, for instance, the power of a Mac Pro would be largely wasted and it's size a serious disadvantage.
    So which to choose would depend on many factors which you haven't enumerated here.
    Regards.
    Message was edited by: Dave Sawyer

  • I cannot access my ebay account. I can still look for stuff but if I try to login in I get an error message saying that the connection was reset. This is the only site I am having issues with. The site works with IE6 but I would rather use Firefox.

    - Was having problems accessing messages on Facebook, seems to be working now
    - Cannot login on ebay.ca or ebay.com
    - Having troubles listing items on ebay (uploading pictures)... this started before the logging in problems
    - Problems only on laptop, other PC in the not having any problems
    - Can log in to ebay using IE on laptop, but I would rather use Firefox

    HouFunGuy wrote:
     One thing I notice is that the _mmServerScripts folder does not show up in my Local Files folder - even after refreshing. (The underscore must hide this folder?)When I change the drop-down from Local View to Testing Server I don't see the _mmServerScripts folder, and all folders are red.
    The underscore at the beginning of the folder name hides it in the Files panel, although you can turn on the option to display hidden files by accessing the panel options menu.
    The folder icons in the Files panel are colour coded: green is for local files, red represents the testing server (or Subversion repository, if defined), and yellow (Windows) or blue (Mac) represents your remote server.
    As Randy says, check the Web URL in your testing server definition. It should be http://localhost/check_php/.

  • I never used this program before. I tapped on the "budget form" and decided I'd rather use the "expense form".  I can't figure out how to get to the page that you choose which form you want

    I never used this program before. I tapped on the "budget form" and decided I'd rather use the "expense form".  I can't figure out how to get to the page that you choose which form you want. How would I do that?

    Pct,
    In the Numbers spreadsheets window where all your documents are shown as icons, tap the Plus Sign.
    Choose Create Spreadsheet
    Select the template you want to use
    Jerry

Maybe you are looking for

  • Ref: NON PO INVOICE

    Hi experts what is the non PO vendor invoice how can we create non PO vendor invoice in SAP? could you please tell me...

  • Syncing Lightroom Collections with Smugmug Galleries

    Is it possible to keep Lightroom Collections in sync with Smugmug Galleries within Lightroom itself?  For example, I have a Lightroom Collection called Sunsets and I also have a Smugmug Gallery called Sunsets. If I were to add a picture to the Lightr

  • E-commerce 5 & existing sites

    Hi, Just a quick few questions about E-commerce 5 (for those who have already been involved in B2C installations). 1. Is this basically ISA 4 with a new UI layer or has the underlying frameworks changed as well? 2. Performance better or worse compare

  • Writing a score in logic(getting started)

    Dear Logic 7 users, I am new to Logic as I've recently bought a used license for logic 7.0 with the 7.2 upgrade as well. I have no D"D interface yet and just my old trusty power 12" to work with. But I think for this first thing I want to figure out

  • Not able to debug Provider Hosted App in local (Deployed in Azure and Hosted in Office 365)

    I have Provider Hosted App - Deployed in Azure and Hosted in Office 365.  Deployed successfully on azure after attaching publishing profile of azure. Now I wish to debug app in local?