[wanproxy/wanproxy] de1e0c: Use pthread mutexes directly when NDEBUG.

Juli Mallett juli at clockworksquid.com
Wed Feb 3 01:13:12 PST 2016


  Branch: refs/heads/master
  Home:   https://github.com/wanproxy/wanproxy
  Commit: de1e0ced2ebc715fa4325b538be8ee0787d0d770
      https://github.com/wanproxy/wanproxy/commit/de1e0ced2ebc715fa4325b538be8ee0787d0d770
  Author: Juli Mallett <juli at clockworksquid.com>
  Date:   2016-02-03 (Wed, 03 Feb 2016)

  Changed paths:
    M common/thread/mutex_posix.cc
    M common/thread/mutex_posix.h
    M common/thread/sleep_queue_posix.h

  Log Message:
  -----------
  Use pthread mutexes directly when NDEBUG.

We only need the extra state for debugging and invariants.  This
greatly reduces overhead, and doubles the throughput of
callback-speed1.


  Commit: 4f39f360e27d95937b728db9fe360f23d9638a48
      https://github.com/wanproxy/wanproxy/commit/4f39f360e27d95937b728db9fe360f23d9638a48
  Author: Juli Mallett <juli at clockworksquid.com>
  Date:   2016-02-03 (Wed, 03 Feb 2016)

  Changed paths:
    M event/callback.cc
    M event/callback.h
    M event/callback_thread.cc
    M event/callback_thread.h

  Log Message:
  -----------
  Track whether a Callback has been descheduled.

This allows us to avoid acquiring the scheduler's lock when cancelling
the Action associated with a Callback which is being executed while it
has been descheduled.

With NDEBUG, this yields a ~30% improvement in callback-speed1.


Compare: https://github.com/wanproxy/wanproxy/compare/e1f5010fd3de...4f39f360e27d


More information about the wanproxy mailing list