From owner-freebsd-current@freebsd.org Wed Nov 23 16:47:17 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56B15C519DF; Wed, 23 Nov 2016 16:47:17 +0000 (UTC) (envelope-from annulen@yandex.ru) Received: from forward2o.cmail.yandex.net (forward2o.cmail.yandex.net [IPv6:2a02:6b8:0:1a72::287]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0BDE199F; Wed, 23 Nov 2016 16:47:16 +0000 (UTC) (envelope-from annulen@yandex.ru) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [37.140.190.19]) by forward2o.cmail.yandex.net (Yandex) with ESMTP id 382FA20F9E; Wed, 23 Nov 2016 19:47:13 +0300 (MSK) Received: from web11o.yandex.ru (web11o.yandex.ru [95.108.205.111]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id wxNkHdSoMi-lClGarhH; Wed, 23 Nov 2016 19:47:12 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1479919632; bh=bWWKRV/MHw8bg4jmWGbIywmL45wQHGulk4GGglnFkM4=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date; b=diky/FkuWMRsOGhdHSQIzk0lJ7K8MG7nd7ib8CAT8Tf+LDccduahm9cSmOgGG8MKX bVI1g1TA6NEATb6jPT/j0g2z2nwl+tNqwTY8BfVNTp58RZFMcNWIpZreZYRpb5iiqh IJyYcZJkdjytb08BvW38cFg0Exj0gpdoito8fIAA= Authentication-Results: mxback5o.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by web11o.yandex.ru with HTTP; Wed, 23 Nov 2016 19:47:12 +0300 From: Konstantin Tokarev To: Hans Petter Selasky , Ed Schouten Cc: "ports@freebsd.org" , Baptiste Daroussin , FreeBSD Current , Slawa Olhovchenkov In-Reply-To: References: <20150414200459.GE39658@ivaldir.etoilebsd.net> <20150421103454.GR1394@zxy.spb.ru> <5593D0AE.2010205@selasky.org> <416359ce-1dcd-1160-5c56-f120a0f6358f@selasky.org> <20160627115533.gqvdsmtzwnvrrfuo@ivaldir.etoilebsd.net> <0671148b-d7cd-f8ad-906d-a0baa1b98cf5@selasky.org> Subject: Re: Optimising generated rules for SAT solving (5/12 are duplicates) MIME-Version: 1.0 Message-Id: <402001479919632@web11o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Wed, 23 Nov 2016 19:47:12 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Mailman-Approved-At: Wed, 23 Nov 2016 17:43:30 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 16:47:17 -0000 23.11.2016, 19:42, "Hans Petter Selasky" : > On 11/23/16 17:27, Ed Schouten wrote: >>  Hi Hans, >> >>  2016-11-23 15:27 GMT+01:00 Hans Petter Selasky : >>>  I've made a patch to hopefully optimise SAT solving in our pkg utility. >> >>  Nice! Do you by any chance have any numbers that show the performance >>  improvements made by this change? > > Hi Ed, > > I tried measuring with "time", but figured out that it was doing a lot > of other stuff too. Isolating this piece of code was not so easy. > >  > Assuming that the SAT solver of >>  pkg(1) uses an algorithm similar to DPLL[1], a change like this would >>  affect performance linearly. My guess is therefore that the running >>  time is reduced by approximately 5/12. Is this correct? >> >>  By the way, why attach a zip file with a diff? GitHub's pull requests >>  are awesome! :-) > > GitHub wouldn't allow me to make a .diff attachment. If you really want to be nasty and not submit your change as a pull request, GitHub allows you to paste your patch as a comment: ```diff ``` > >>  [1] Davis-Putnam-Logemann-Loveland algorithm: >>  https://en.wikipedia.org/wiki/DPLL_algorithm > > --HPS > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" -- Regards, Konstantin