Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cv7sp-0005EA-Fb for pgsql-jdbc@arkaria.postgresql.org; Mon, 03 Apr 2017 19:43:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cv7so-0005qw-OV for pgsql-jdbc@arkaria.postgresql.org; Mon, 03 Apr 2017 19:43:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cv7sI-000411-Ep for pgsql-jdbc@postgresql.org; Mon, 03 Apr 2017 19:42:50 +0000 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cv7sE-0007Ug-FA for pgsql-jdbc@postgresql.org; Mon, 03 Apr 2017 19:42:49 +0000 Received: by mail-wr0-x232.google.com with SMTP id k6so179240915wre.2 for ; Mon, 03 Apr 2017 12:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=8kdata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=GsGqEs1WPedDMvlR9Tj6wvntqkqxClhXGE5872DuXXI=; b=MeC9iMucaMJDRfhrilUWWhz9WrFaD3skiJEvNfeHMlRwqiq5dgWHqS5mUPSn1m6LIp 51tf/UFXLoesoKpg/zBevRtWtd/2i8bPH1mO0R7ssm2VD7YR0b9++6wnx4gxV8Sqzkny ltJRe5pF+A6CTT00UAZk8E2XS+ldlep4dhAVXpqGhhAy82SvozB+Y/WcCxMmVpVVA9um CpbCKXl5z9LiYHCqaZSJUeSCAMhF18ovNQ1VfgVZwY6Bru7/QtqjADPCvzYrLrBAtb6l ipQWQnb3cKxr8e5geNQKHwFkkK/EjqSrpNGWP5xjrzA6EcD3D1N7RDw4OQ7bL2161VIB 5uuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=GsGqEs1WPedDMvlR9Tj6wvntqkqxClhXGE5872DuXXI=; b=uZBt9gPAgqj0AS98cux6Y5loFeNIJTSCacRq08EY4J0Yu71F7Q1AyBkonQJP5Ca8+n 6Fxmb5r5rxx9OK/ASvHZNi4fs4ssk7dKLF5nLEvfPfwK/plMmicZJoWrjFSWbJGNaoyh e1mwhWjSanFHKmWSEvGPyX0ScBumP+/Mu2chJXo55cObw3wqujX87y+pe8o6CDw9zkR0 IX560AW/DMzp+J3+PPbuMoNGcFQshaWF6qWY2ppTRFclWdy7AC4bnmELxwrg45WCL/+y V3AIFm6KXGRGu1Fno+QxRs3uWZgnkZuB1qQ+WKqfvciOt+49TanA9F19hUDej4EQqH+q baPQ== X-Gm-Message-State: AFeK/H0YFOaC2cnpefHAIXBdX5OyvIA4g/n3PHOFUIiv6bZ5Eh6wpnFWhx7kzw0axiR8Hw== X-Received: by 10.28.6.213 with SMTP id 204mr5757249wmg.68.1491248565303; Mon, 03 Apr 2017 12:42:45 -0700 (PDT) Received: from [10.0.10.100] (111.red-88-3-36.dynamicip.rima-tde.net. [88.3.36.111]) by smtp.gmail.com with ESMTPSA id j2sm16852007wrd.26.2017.04.03.12.42.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 12:42:44 -0700 (PDT) Subject: Re: RFC: Make new versions of pgjdbc Java8+ To: rado@edno.moe References: <393118b3-4373-3e27-6f7e-0a7f764c9c81@8kdata.com> <9289bc74-5c08-c180-3a7a-943c79230824@8kdata.com> <41ED3F5450C90F4D8381BC4D8DF6BBDCAF6CA67F@EXCHANGESERVER.ikoffice.de> <5989a0cc-8318-28a7-9389-b284f42f671c@8kdata.com> <41ED3F5450C90F4D8381BC4D8DF6BBDCAF6CA6F3@EXCHANGESERVER.ikoffice.de> <58330587-d79c-78e0-b239-2db7c59cecef@8kdata.com> <10139f8589debc46122b31ecf3720626@edno.moe> Cc: Daniel Migowski , Dave Cramer , John R Pierce , List , pgsql-jdbc-owner@postgresql.org From: =?UTF-8?Q?=c3=81lvaro_Hern=c3=a1ndez_Tortosa?= Message-ID: <971a86da-3576-1a1d-e80a-40038bf9793b@8kdata.com> Date: Mon, 3 Apr 2017 21:42:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <10139f8589debc46122b31ecf3720626@edno.moe> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On 03/04/17 21:34, rado@edno.moe wrote: > Hello Alvaro, > > On 2017-04-03 21:53, Álvaro Hernández Tortosa wrote: >> On 03/04/17 20:47, Daniel Migowski wrote: >> >>> Hello Alvaro, >>> >>> while the biggest performance hit currently in the driver is the >>> switch to java.util.Logging (i will come up with numbers regarding >>> that in a few days, comparing it to previous versions). Currently, >>> and comparing to the 9.3 driver with the current driver, the >>> Hibernate databases checks take twice the time than before! Even if >>> some parts have improved (see changes in PGStream and >>> VisibleBufferedInputStream, nice reuse of arrays there since 9.3) >>> other things have changed to the bad. >>> >>> I also already did my tests regarding the stuff below, and concluded >>> that in our company lambda’s are useful in the GUI, but as I said >>> shouldn’t be used on the server. In my tests they were about 50% >>> percent slower in the long run. >>> >>> Streams are the same thing… just look at the stack traces! Good >>> for rarely used stuff, but honestly I prefer a nice loop where you >>> see what is happening in terms of object creation over streams that >>> might be concise, but are not needed. At least not for something you >>> call potentially 100ths of times a second. >> >> While I agree Lambdas and Streams should be used with care, I'm >> still unconvinced that they really take a hit in performance (if the >> compiler is not optimizing that, which most of the time does). I would >> really love to see some numbers to prove my wrong in this respect. But >> I don't see much trends towards not using them in the Java world (but >> the contrary) and I talk to very performance conscious people. > > I've remembered about this writing: > http://blog.takipi.com/benchmark-how-java-8-lambdas-and-streams-can-make-your-code-5-times-slower/ > > They have the code available, I haven't verified it personally. Also > it is possible the outcome to be different with the newer releases of > the JDK. Please note the difference between the original results and > the updated ones. > > The base line is: you have to be extra careful with the streams, > autoboxing and to avoid using lamdas in "hot" places. At least for the > tested use case - "sorting ArrayList populated with 100 000 random > integers". Yeah, that's exactly what I meant: they should be used with care. But that is quite different from never using them at all :) Thank you for the link, I read that in the past and is a good example. Cheers, Álvaro -- Álvaro Hernández Tortosa ----------- <8K>data -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc