hotspot

unexplained 10%+ performance boost from simply adding a method argument (slimmer jit code)

泄露秘密 提交于 2021-02-17 19:13:07
问题 (note: proper answer must go beyond reproduction). After millions of invocations, quicksort1 is definitely faster than quicksort2, which have identical code aside from this 1 extra arg. The code is at the end of the post. Spoiler: I also found the jit code is fatter by 224 bytes even if it should be actually simpler (like the byte code size tells; see very last update below). Even after trying to factor out this effect with some microbenchmark harness (JMH), the performance difference is

unexplained 10%+ performance boost from simply adding a method argument (slimmer jit code)

[亡魂溺海] 提交于 2021-02-17 19:07:25
问题 (note: proper answer must go beyond reproduction). After millions of invocations, quicksort1 is definitely faster than quicksort2, which have identical code aside from this 1 extra arg. The code is at the end of the post. Spoiler: I also found the jit code is fatter by 224 bytes even if it should be actually simpler (like the byte code size tells; see very last update below). Even after trying to factor out this effect with some microbenchmark harness (JMH), the performance difference is

unexplained 10%+ performance boost from simply adding a method argument (slimmer jit code)

喜你入骨 提交于 2021-02-17 19:07:14
问题 (note: proper answer must go beyond reproduction). After millions of invocations, quicksort1 is definitely faster than quicksort2, which have identical code aside from this 1 extra arg. The code is at the end of the post. Spoiler: I also found the jit code is fatter by 224 bytes even if it should be actually simpler (like the byte code size tells; see very last update below). Even after trying to factor out this effect with some microbenchmark harness (JMH), the performance difference is

How do I get the current state of LocalOnlyHotspot?

你说的曾经没有我的故事 提交于 2021-01-29 14:01:08
问题 Android O offers wifiManager.startLocalOnlyHotspot to create a closed network. For designing a shortcut or widge to toggle this kind of hotspot, how could I know the status of LocalOnlyHotspot to judge to start or close it? And when I start a localOnlyHotspot, how can other device connect to it? (how to get the password of it?) 回答1: This code may help you to get it running. I implemented a Hotspotmanager Class, which can be used in applications. After turning on the hotspot, it deliveres a

Where is the assembly implementation code of the intrinsic method in Java HotSpot?

不想你离开。 提交于 2020-04-18 06:24:47
问题 from http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/classfile/vmSymbols.hpp, I can see the intrinsic method declare like: do_intrinsic(_getByte, sun_misc_Unsafe, getByte_name, getByte_signature, F_RN) \ but how to find the actually implementation(assembly code I think) of the method _getByte ? 回答1: but how to find the actually implementation(assembly code I think) of the method _getByte By looking for vmIntrinsics::_getByte in your IDE or simply by grepping

Where is the assembly implementation code of the intrinsic method in Java HotSpot?

馋奶兔 提交于 2020-04-18 06:24:29
问题 from http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/classfile/vmSymbols.hpp, I can see the intrinsic method declare like: do_intrinsic(_getByte, sun_misc_Unsafe, getByte_name, getByte_signature, F_RN) \ but how to find the actually implementation(assembly code I think) of the method _getByte ? 回答1: but how to find the actually implementation(assembly code I think) of the method _getByte By looking for vmIntrinsics::_getByte in your IDE or simply by grepping

【转】HotSpot虚拟机对象探秘

冷暖自知 提交于 2020-04-09 19:53:46
请读者首先注意本篇的题目中的限定语“HotSpot虚拟机”,在虚拟机规范中明确写道, 所有在虚拟机规范之中没有明确描述的实现细节,都不应成为虚拟机设计者发挥创造性的牵绊,设计者可以完全自主决定所有规范中不曾描述的虚拟机内部细节。 例如:运行时数据区的内存如何布局、选用哪种垃圾收集的算法等”。因此,本篇(整个内存篇中所有的文章)的内容会涉及到虚拟机“自主决定”的实现,我们的讨论将在HotSpot VM的范围内展开。同时,我也假定读者已经理解了虚拟机规范中所定义的JVM公共内存模型,例如运行时数据区域、栈帧结构等基础知识,如果读者对这些内容有疑问,可以先阅读《Java虚拟机规范(JavaSE 7 Editon)》[注1]第2章或《深入理解Java虚拟机:JVM高级特性与最佳实践》[注2]的第2、3章相关内容。 对象的创建 Java是一门面向对象的编程语言,Java程序运行过程中无时无刻都有对象被创建出来。在语言层面上,创建对象通常(例外:克隆、反序列化)仅仅是一个new关键字而已,而在虚拟机中,对象(本文中讨论的对象限于普通Java对象,不包括数组和Class对象等)的创建又是怎样一个过程呢? 虚拟机遇到一条new指令时,首先将去检查这个指令的参数是否能在常量池中定位到一个类的符号引用,并且检查这个符号引用代表的类是否已被加载、解析和初始化过的。如果没有,那必须先执行相应的类加载过程。

enable Win10 inbuild hotspot by cmd/batch/powershell

怎甘沉沦 提交于 2020-01-22 12:43:11
问题 as the title says I search for a way to enable/disable the Hotspot inbuild in Win10 via the command prompt/powershell/a batch file. In the GUI it can be easily done with the third button in the network panel (see image below), but I want to automate it. I already found some hundred tutorials how to create a new hotspot via netsh, but as I understand it this would create another, different hotspot. Instead I want to use the already configured one. Or does Win10 the same and everytime creates a

enable Win10 inbuild hotspot by cmd/batch/powershell

你。 提交于 2020-01-22 12:42:45
问题 as the title says I search for a way to enable/disable the Hotspot inbuild in Win10 via the command prompt/powershell/a batch file. In the GUI it can be easily done with the third button in the network panel (see image below), but I want to automate it. I already found some hundred tutorials how to create a new hotspot via netsh, but as I understand it this would create another, different hotspot. Instead I want to use the already configured one. Or does Win10 the same and everytime creates a

webserver on an android hotspot - what's its IP?

醉酒当歌 提交于 2020-01-13 10:54:46
问题 I want to setup an android phone as a wifi-hotspot, then run a webserver on it, and browse it from another phone connected to the hotspot. My phone isn't rooted, but I have termux, which has many unix utilities. I don't want to install an extra app. (But happy to write one!) I can view python's simple webserver on http://localhost (on the host), but not on the other phone. I tried using the public-facing IP of the host phone (checking it using whatsmyip-type webpages), but didn't work.