From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 22 10:57:28 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1A816A41B for ; Tue, 22 Jan 2008 10:57:28 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 683C113C474 for ; Tue, 22 Jan 2008 10:57:28 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id F11781B10EEE; Tue, 22 Jan 2008 11:57:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.6 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id 731881B10EA4 for ; Tue, 22 Jan 2008 11:57:24 +0100 (CET) Message-ID: <4795CC13.7080601@moneybookers.com> Date: Tue, 22 Jan 2008 12:57:23 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5519/Tue Jan 22 05:46:17 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: Subject: gettimeofday() in hping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 10:57:28 -0000 Greetings, I noticed that hping3 (from ports) is quite slower when running on FreeBSD compared to Linux. Simple ktrace shows lot of gettimeofday() calls, so I'm looking for replacement of this function. I tried clock_gettime() (using CLOCK_REALTIME for clock_id), but this yield worse performance. Of course changing timecounter to TSC make hping almost twice faster, but I'm wandering if I can optimize things more? -- Best Wishes, Stefan Lambrev ICQ# 24134177