From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Some dynamic module questions Date: Fri, 27 Nov 2020 12:50:34 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32716"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 27 12:51:34 2020 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 1kicHl-0008ON-O2 for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Nov 2020 12:51:33 +0100 Original-Received: from localhost ([::1]:48616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kicHk-0007JL-Mg for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Nov 2020 06:51:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kicH2-0006PZ-Ss for emacs-devel@gnu.org; Fri, 27 Nov 2020 06:50:48 -0500 Original-Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]:42276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kicH1-0006pE-Fz for emacs-devel@gnu.org; Fri, 27 Nov 2020 06:50:48 -0500 Original-Received: by mail-oi1-x236.google.com with SMTP id v202so5547826oia.9 for ; Fri, 27 Nov 2020 03:50:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h0M3TGEBNM2GjHqDi0LHX+4rbK5sj9e+KN3pvFTpfCw=; b=OIOJnoVGx+0oFyYKJr4CsO2NLh+6fUQz3eMcm9kwY27snZ2VInEXhAxRxhfzXYvklf 8bWJV7sJ+7VuKXmtbbRA0Fko6cpaQdnzatsB1V2xQsxXVs6wsjdN5NXtFEMW5uOpYflR jppl0tZW8erybHRRral2pyM/i7w50+ugb5unCMWC80XH42/19TKnwJP6gDgiCfqoU+Dc SZNWG9lLN84a2GouLT2DcnKwucm91vplDQQZNMSc8uV5C5rixhzCjn7og9x1MWMG5YWl ghkxJEn64Q/Nh1YgGHilbRV7uyQuPaWy8kH1Palb0B7yVXEaIZzMXtvfSMs3HINmdSNQ fNRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h0M3TGEBNM2GjHqDi0LHX+4rbK5sj9e+KN3pvFTpfCw=; b=MrIQs2JkPNIdVXzu2B2YAKaogA8fTyLkwh+/5MBWSbp6bFDqHRQyqqBXUpSqU0lvcn voSdYBYtX2YXGeZfqlsKe5KIbbq3pM2ZeIfkMDrBDJh7ZKvYg13QU9Jv1x/ZPWbEfMdj o97hGuUGREzHf4va1Fa4glfW6gLFwfKP8x5K87yq8nOCeoAn91t75Cg7nLaesIZO0nfj OjWyTFSkUTbh9OBieQ44lRXtbaTrKLG/TF1C4RL4oXHneBLvz/BoUOyeMbFkpqY0568F ngnAWYmQ81dAxvMKvamjC0Rwl7TZ46dIEyPyMCSmNBykbY1HQ5P/i2G4gzWgeGTLb7RG 3qOg== X-Gm-Message-State: AOAM533mODlI1u9TH3ToeHLttqAM0bNf80YkFcIRq/W3dsn9m8o7kmYP nQX9kw3jwIwOW/76jVEKwkwEVhrUubzyZZeX5V8= X-Google-Smtp-Source: ABdhPJwCqTdXIKXQ6/12vi/5RJY0qIlMOJ4ZiQ15oXW18OLTfSrJdT0wzcDWe1MDxLsAMW5mJwZotCmWiEnDil7tuAw= X-Received: by 2002:aca:1b0a:: with SMTP id b10mr4876731oib.9.1606477845855; Fri, 27 Nov 2020 03:50:45 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=p.stephani2@gmail.com; helo=mail-oi1-x236.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:259872 Archived-At: Am Fr., 27. Nov. 2020 um 11:47 Uhr schrieb Helmut Eller : > > 1. Is there some way to pass unibyte-strings to module functions? Emacs 28 will have a make_unibyte_string function. Before that, you have to resort to calling the unibyte-string function directly. > > 2. Why does initialize_environment copy all the function pointers all > the time? Would it be more efficient to use the same function table > for all environments. The environment structure holds some per-call state (the signal data), so we need to create a new one for each call. We could in theory optimize this by preinitializing an environment structure with the function pointers (saving a few IP-relative memory accesses); I'm not sure whether that's significantly faster though.