Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: Re: [Wireshark-dev] Small performance improvements to packet-http.c

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Stephen Fisher <stephentfisher@xxxxxxxxx>
Date: Wed, 7 Nov 2007 17:12:05 -0700

On Mon, Nov 05, 2007 at 09:15:45AM +0200, Kaul wrote:

> Somewhat inspired by the performance improvements to tvbuff, I've made
> some small performance improvements to packet-http.c:

> 1. In the most common cases 'GET ', 'POST', 'HTTP' - compare them
> against the 32bit value of those strings, instead of strncmp(). I
> reckon in most cases it'll be used, and there won't be need for longer
> comparison paths.

Is this a significant enough performance improvement to warrant making
the code a bit harder to read, maintain and understand?  The strncmp()
function, at least in a recent FreeBSD libc, looks pretty quick and
simple as it is.  I am just wondering; I do not mean to discourage you
from you from contributing.


Steve


  • Follow-Ups:
    • Re: [Wireshark-dev] Small performance improvements to packet-http.c
      • From: Kaul
  • References:
    • [Wireshark-dev] Small performance improvements to packet-http.c
      • From: Kaul
  • Prev by Date: Re: [Wireshark-dev] Small performance improvements to packet-http.c
  • Next by Date: Re: [Wireshark-dev] Small performance improvements to packet-http.c
  • Previous by thread: Re: [Wireshark-dev] Small performance improvements to packet-http.c
  • Next by thread: Re: [Wireshark-dev] Small performance improvements to packet-http.c
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation