From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add a mechanism for passing unibyte strings from lisp to modules. Date: Wed, 26 Jun 2024 18:34:28 +0300 Message-ID: <867ceb90qj.fsf@gnu.org> References: <225D336D-933E-4CA3-B245-89992D7E6C41@umanwizard.com> <86frt5jwtc.fsf@gnu.org> <87o77t6lyn.fsf@taipei.mail-host-address-is-not-set> <867cehgdn1.fsf@gnu.org> <861q4md0o1.fsf@gnu.org> <87jzickjq8.fsf@taipei.mail-host-address-is-not-set> <86wmmb99f7.fsf@gnu.org> <86ikxv96sd.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40461"; mail-complaints-to="usenet@ciao.gmane.io" Cc: brennan@umanwizard.com, acorallo@gnu.org, stefankangas@gmail.com, emacs-devel@gnu.org To: tomas@tuxteam.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 26 17:35:23 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sMUg6-000ABF-Vo for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jun 2024 17:35:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMUfL-0001XU-Ep; Wed, 26 Jun 2024 11:34:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMUfI-0001Wc-CT for emacs-devel@gnu.org; Wed, 26 Jun 2024 11:34:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMUfH-00068e-Ed; Wed, 26 Jun 2024 11:34:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=uhYr6ylRKUB2NxNM1zPB3My5At8plEsAYyCLmb9kmtY=; b=Ff6UOYtP55Zm iKn4HINpKSj6f8BiGzLr3n5p5J0oN6DFrz0kmaUJ5aIfH/g6fIo5cY2UGAmqQymT2b4TpCZ89wqrj HMd7iejlIo1HBxl+F1zzgVf1kZEYZUosr/jk0Hvb5B1WAv4asDFjLZUUD2QKYsAPMtSG6Brfk+RcQ NtQnPK50djDNxqILvZ9OYej38NmMjvTObCmgpFJs+RFhbzXzikP/FqkC1UrWs7DfiqDjtVMPSfePM E9+fD79HIarXUzw0c0BVAuPIsZMvdfeDe88wECpPJ0SKEA2NooE+UXcKY06NUwLR6UGpV34yncwJm HGwCiiic1zy6adFe03h2ZQ==; In-Reply-To: (tomas@tuxteam.de) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320715 Archived-At: > Date: Wed, 26 Jun 2024 15:33:09 +0200 > From: tomas@tuxteam.de > Cc: brennan@umanwizard.com, acorallo@gnu.org, stefankangas@gmail.com, > emacs-devel@gnu.org > > > > > How will it be different from the Lisp vectors we already have? > > > > > > The box around every byte. > > > > What box? Please tell more, as I don't think I follow. > > Maybe I'm all wrong, but AFAIU, a vector can contain arbitrary Lisp > values. That makes 64bits/8bits plus boxing/unboxing (which is, I > assume, quick, but nonzero). > > Having a specialized "array of bytes" (as there is one for bools) > might be beneficial for big arrays, and perhaps avoid big data moving > operations over the C/LISP fence. If you are saying that using 64-bit values there incurs a run-time performance penalty, then accessing bytes does that as well. Someone should profile this and present evidence wrt the relative performance of these, then we can discuss whether the penalty is real and whether it is worth adding yet another data type to Emacs.