From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [IPv6:2a0c:5a00:149::26]) by sourceware.org (Postfix) with ESMTPS id 08AB63858426 for ; Sat, 7 Oct 2023 03:54:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 08AB63858426 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bothner.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bothner.com Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1qoyP2-004gVk-At; Sat, 07 Oct 2023 05:54:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bothner.com ; s=selector1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID; bh=r8ORSS7UuFSzhq+zCn1v1A5ULZaM+62KVQMsYbAgTOQ=; b=f+pma757Kcbu91w981fbssM/5N K3S7gN3Mieh+5z0DuJ3M7YrRL5oABDLiPBkC3eAyXtaiWXi/E9h/3prEby1MsF7bDueGtWY9tzck2 5mEwnaOSU1CLQCDWuTWNUJD+1/ozN9eX/jc/LnrCS1j9ScUUBakAi8XHxrYlcQkCCF3oHdwr2W1Ns +BrFAzHH//znMkD5/vVBaCV08rEcUwsAsgmu/f4YldnS9QEnp+OugEIyFIea68c4Grbotd1HrXtBU avz6fcnhco1sQzk4SARayeNMVWd03W6NHi/ANRSAy7B9miVAUw9vQRJLzV2XsSOfO6UpDRbkGe/Lm pH7D7hhw==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1qoyP0-00082n-Nf; Sat, 07 Oct 2023 05:54:54 +0200 Received: by submission02.runbox with esmtpsa [Authenticated ID (524175)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1qoyOl-0000ib-Kp; Sat, 07 Oct 2023 05:54:39 +0200 Message-ID: <5715cd57-e600-60ff-957d-35c0016f9654@bothner.com> Date: Fri, 6 Oct 2023 20:54:34 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Profiling Kawa code To: Panicz Maciej Godek , kawa References: Content-Language: en-US From: Per Bothner In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/6/23 18:18, Panicz Maciej Godek via Kawa wrote: > it seems that reflection uses over 18% of total time, and I think it would > be great if this overhead could somehow be removed > (I don't think that the design of GRASP requires any reflection, so it's > possible that I'm misusing Kawa in some ways) I don't remember exactly when lang.reflect.Method.invoke is called. One place is when you try to call a Java methid (perhaps with the invoke procedure) but the compiler can't resolve it to a specific method (or virtual method). You need to figure out where in the generated bytecode Method.invoke is called. You can use javap or some other bytecode de-compiiler or dis-assembler. Once you narrow down wheer the call is coming from you can add type specifiers to help the compiler. -- --Per Bothner per@bothner.com http://per.bothner.com/