From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 934B8469710 for ; Wed, 18 Nov 2020 01:08:27 +0300 (MSK) References: <20201111200408.49148-1-olegrok@tarantool.org> <1b1c65f6-2ac5-0112-a5b9-ffa8f94b1b71@tarantool.org> <20201117091114.GA14086@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Tue, 17 Nov 2020 23:08:25 +0100 MIME-Version: 1.0 In-Reply-To: <20201117091114.GA14086@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH] lua: introduce function for uuid comparison List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the reply! >> tarantool> u1 = 'b0b681e9-dd43-4341-98b4-a973b23f1421' >> --- >> ... >> >> tarantool> u2 = uuid() >> --- >> ... >> >> tarantool> type(u2) >> --- >> - cdata >> ... >> >> tarantool> type(u1) >> --- >> - string >> ... >> >> tarantool> u2 < u1 >> --- >> - true >> ... >> >> tarantool> u1 > u2 >> --- >> - true >> ... >> >> Doesn't this look wrong? > > Yes and no. At first result is the same. Oh, shit. I am so stupid. Sorry, Oleg and Igor, my bad. My comment about comparison being wrong is not fair, obviously. But still propose to use static_alloc. I do not insist. Only if perf matters. (For me it matters always, so I would try.)