# Ali Dehghan - Kemikit

A chemical romance bursts into the IT world

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Infinite Precision

DevFeed: [Infinite Precision](<https://devfeed.tech/articles/infinite-precision-24837.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/12/18/infinite-precision>)

Author: Alimate

Published: 2020-12-18T00:00:00Z

Content type: article

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [Error Propagation](<https://devfeed.tech/topics/error-propagation.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>)

Tags: [approximation](<https://devfeed.tech/tags/approximation.md>), [measurement](<https://devfeed.tech/tags/measurement.md>), [measurements](<https://devfeed.tech/tags/measurements.md>), [uncertainty](<https://devfeed.tech/tags/uncertainty.md>)

### AI overview

Measurements always carry uncertainty; that uncertainty does not necessarily mean someone made a mistake. The excerpt illustrates this with a reported height of 5′ 8″, which could have been recorded more precisely, and argues that useful precision depends on the approximation a person is comfortable with. It then applies the idea to timing code: even a simple execution-time measurement depends on the measuring device, and the excerpt begins to raise NTP as a possible source of error without explaining further.

### Source excerpt

The art, science, and pitfalls of measurement!

## HotSpot Intrinsics

DevFeed: [HotSpot Intrinsics](<https://devfeed.tech/articles/hotspot-intrinsics-24836.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/12/10/hotspot-intrinsics>)

Author: Alimate

Published: 2020-12-10T00:00:00Z

Content type: article

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [openjdk](<https://devfeed.tech/topics/openjdk.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [hotspot](<https://devfeed.tech/tags/hotspot.md>), [intrinsics](<https://devfeed.tech/tags/intrinsics.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>)

### AI overview

The excerpt reports that a benchmark found the indirect logarithm method had nearly 105% higher throughput than a supposedly more direct implementation. It explains that HotSpot may inline the delegation when a method becomes hot, but also may replace a Java method implementation with a compiler intrinsic. The excerpt points to an intrinsic for the logarithm method and notes that, as of Java 16, an earlier method was repackaged and renamed. It does not identify the methods, provide benchmark conditions, or include the full explanation of the intrinsic.

### Source excerpt

How Does the HotSpot JVM Intrinsify Some Method Implementations?

## On Generating Identity Hash Codes

DevFeed: [On Generating Identity Hash Codes](<https://devfeed.tech/articles/on-generating-identity-hash-codes-24843.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/7/15/hash-code>)

Author: Alimate

Published: 2020-07-15T00:00:00Z

Content type: article

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [hashCode](<https://devfeed.tech/topics/hashcode.md>), [hashing](<https://devfeed.tech/topics/hashing.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [cas](<https://devfeed.tech/tags/cas.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [flag](<https://devfeed.tech/tags/flag.md>), [function](<https://devfeed.tech/tags/function.md>), [generate](<https://devfeed.tech/tags/generate.md>), [generator](<https://devfeed.tech/tags/generator.md>), [hash](<https://devfeed.tech/tags/hash.md>), [hashcode](<https://devfeed.tech/tags/hashcode.md>), [hotspot](<https://devfeed.tech/tags/hotspot.md>), [identity](<https://devfeed.tech/tags/identity.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [memory](<https://devfeed.tech/tags/memory.md>), [random](<https://devfeed.tech/tags/random.md>), [retry](<https://devfeed.tech/tags/retry.md>), [threads](<https://devfeed.tech/tags/threads.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

HotSpot JVM's identity hash code generation strategy is controlled by an experimental tuning flag, and the excerpt describes several approaches. The Park-Miller/Lehmer RNG strategy atomically updates a global seed; concurrent first-time hash requests can cause compare-and-swap failures and retries. Two strategies derive the hash code from a function of the object's memory address. A static-number strategy always returns 1, which the author guesses may serve as a benchmark baseline. The excerpt begins to introduce a sequential-number strategy but cuts off before explaining it, and omits code and values needed to detail the other strategies.

### Source excerpt

Have you ever wondered how does the HotSpot JVM generate identity hashcodes?

## False Sharing

DevFeed: [False Sharing](<https://devfeed.tech/articles/false-sharing-24842.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/5/1/false-sharing>)

Author: Alimate

Published: 2020-05-01T00:00:00Z

Content type: article

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>)

Tags: [atomic](<https://devfeed.tech/tags/atomic.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [latency](<https://devfeed.tech/tags/latency.md>), [layout](<https://devfeed.tech/tags/layout.md>), [measuring](<https://devfeed.tech/tags/measuring.md>), [memory](<https://devfeed.tech/tags/memory.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [padding](<https://devfeed.tech/tags/padding.md>), [sharing](<https://devfeed.tech/tags/sharing.md>), [threads](<https://devfeed.tech/tags/threads.md>), [throughput](<https://devfeed.tech/tags/throughput.md>)

### AI overview

The excerpt benchmarks eight atomic counters incremented by eight threads, each targeting a distinct counter, and reports about 170 ns per call for the initial layout. Despite no logical counter contention, shared memory layout can affect performance: adding padding between counters produces surprising latency changes. The excerpt describes using JOL to inspect object layout and padding counters until each occupies a separate 64-byte area, but it ends before reporting the final benchmark result or explaining the full measurement.

### Source excerpt

Measuring false-sharing effect on latency and throughput

## Thread Local Randoms in Java

DevFeed: [Thread Local Randoms in Java](<https://devfeed.tech/articles/thread-local-randoms-in-java-24841.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/4/24/thread-local-random>)

Author: Alimate

Published: 2020-04-24T00:00:00Z

Content type: article

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Java](<https://devfeed.tech/topics/java.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [atomics](<https://devfeed.tech/tags/atomics.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [cas](<https://devfeed.tech/tags/cas.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [concurrently](<https://devfeed.tech/tags/concurrently.md>), [generation](<https://devfeed.tech/tags/generation.md>), [generator](<https://devfeed.tech/tags/generator.md>), [global](<https://devfeed.tech/tags/global.md>), [java](<https://devfeed.tech/tags/java.md>), [linear](<https://devfeed.tech/tags/linear.md>), [lock-free](<https://devfeed.tech/tags/lock-free.md>), [memory](<https://devfeed.tech/tags/memory.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [performance](<https://devfeed.tech/tags/performance.md>), [random](<https://devfeed.tech/tags/random.md>), [retry](<https://devfeed.tech/tags/retry.md>), [shared-mutable-state](<https://devfeed.tech/tags/shared-mutable-state.md>), [synchronization](<https://devfeed.tech/tags/synchronization.md>), [thread](<https://devfeed.tech/tags/thread.md>)

### AI overview

The excerpt attributes poor concurrent throughput in shared random generation to contention: Java's implementation updates a shared seed with atomic compare-and-set retries, which can fail repeatedly under load. A thread-local approach avoids shared mutable state and the associated atomicity and memory-ordering costs; in the reported benchmark, it achieved almost twice the throughput of the author's simple implementation. The built-in random generator still outperformed both approaches. The excerpt begins to describe a further optimization--keeping only each thread's latest value instead of a full per-thread generator copy--but cuts off before giving its implementation or results.

### Source excerpt

Benchmarking regular randoms against thread-local ones!

## Time Travel with JVM

DevFeed: [Time Travel with JVM](<https://devfeed.tech/articles/time-travel-with-jvm-24838.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/2/23/time-travel-jvm>)

Author: Alimate

Published: 2020-02-23T00:00:00Z

Content type: article

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [constructor](<https://devfeed.tech/topics/constructor.md>)

Tags: [bytecode](<https://devfeed.tech/tags/bytecode.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [object](<https://devfeed.tech/tags/object.md>)

### AI overview

The excerpt describes allocating a Java object without running its constructor. Normal `new` allocation first gives fields default values, then runs instance initializers and constructors; the example's constructor replaces a default value with the current epoch time. The described alternative bypasses the constructor, leaving the object with default-initialized fields. The excerpt warns that compiling code using this mechanism may produce a warning and advises staying away from it. Code and class names are omitted from the supplied text.

### Source excerpt

Let's allocate a Java object without calling its constructor!

## Java Records: A Closer Look

DevFeed: [Java Records: A Closer Look](<https://devfeed.tech/articles/java-records-a-closer-look-24839.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/2/9/java14-records-in-depth>)

Author: Alimate

Published: 2020-02-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Scala](<https://devfeed.tech/topics/scala.md>)

Tags: [bytecode](<https://devfeed.tech/tags/bytecode.md>), [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [java](<https://devfeed.tech/tags/java.md>), [scala](<https://devfeed.tech/tags/scala.md>)

### AI overview

A technical tutorial examines how Java 14 Records are represented under the hood, including their generated classes, accessors, constructors, methods, and bytecode. It also compares Records with Kotlin data classes and Scala case classes.

### Source excerpt

How records are represented under the hood?

## Java Records: An Introduction

DevFeed: [Java Records: An Introduction](<https://devfeed.tech/articles/java-records-an-introduction-24835.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/1/31/java14-records>)

Author: Alimate

Published: 2020-01-31T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [java](<https://devfeed.tech/tags/java.md>)

### AI overview

An introduction to Java 14 Records, a preview feature that provides compact syntax for immutable data-holder classes. The article explains generated methods, preview-feature flags, custom constructors, methods, and field limitations.

### Source excerpt

A sneak peek at Records which are going to previewed in Java 14

## Lock Striping

DevFeed: [Lock Striping](<https://devfeed.tech/articles/lock-striping-24834.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/1/11/lock-striping>)

Author: Alimate

Published: 2020-01-11T00:00:00Z

Content type: article

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [synchronization](<https://devfeed.tech/topics/synchronization.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [concurrent](<https://devfeed.tech/tags/concurrent.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [lock](<https://devfeed.tech/tags/lock.md>), [lock-free](<https://devfeed.tech/tags/lock-free.md>), [locks](<https://devfeed.tech/tags/locks.md>), [map](<https://devfeed.tech/tags/map.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

The excerpt describes a thread-safe hashtable built with ordinary locks, contrasting its approach with lock-free designs based on CAS. In the coarse-grained version, one lock enforces exclusive access for all operations. The map starts with a fixed number of buckets, selects a bucket using the key's hash modulo the bucket count, and inserts or updates entries. To address performance degradation as stored elements outgrow the buckets, it proposes resizing when an average bucket-size threshold is exceeded; resizing requires copying the current table. The excerpt does not provide the completed resize implementation or results comparing coarse- and fine-grained synchronization.

### Source excerpt

Let's see how well a fine-grained synchronized concurrent data structure performs compared to its coarse-grained counterpart