Tagged articles
13 articles
Page 1 of 1
Open Source Linux
Open Source Linux
Jun 17, 2024 · Fundamentals

for(;;) vs while(1): Which Infinite Loop Is Faster in Embedded C?

This article compares the infinite‑loop constructs for(;;) and while(1) in C, examining compiler optimizations, performance measurements on microcontrollers, coding style guidelines, and industry standards to determine if one form offers any real advantage over the other.

C programmingCompiler OptimizationPerformance Testing
0 likes · 7 min read
for(;;) vs while(1): Which Infinite Loop Is Faster in Embedded C?
Ops Development & AI Practice
Ops Development & AI Practice
Apr 19, 2024 · Backend Development

How to Add a Timeout to an Infinite Loop in Go

This guide shows how to protect a long‑running Go function that checks a RabbitMQ cluster by using time.After and a select statement to automatically stop the infinite loop after a configurable timeout, improving robustness and maintainability.

BackendGolangTimeout
0 likes · 5 min read
How to Add a Timeout to an Infinite Loop in Go
IT Services Circle
IT Services Circle
Jun 20, 2023 · Backend Development

Comparison of while(true) and for(;;) Infinite Loops in Java

This article examines the differences between while(true) and for(;;) infinite loops in Java, presenting equivalent code examples, compiling them to bytecode, and showing that both constructs compile to identical bytecode using a goto instruction, concluding there is no performance distinction.

Javabytecodefor
0 likes · 4 min read
Comparison of while(true) and for(;;) Infinite Loops in Java
Liangxu Linux
Liangxu Linux
Jan 27, 2021 · Fundamentals

Is for(;;) Faster Than while(1) in C? A Practical Comparison

The article compares the infinite loop constructs for(;;) and while(1) in C by compiling simple programs, examining the generated assembly with gcc, and shows that both produce identical machine code, while also noting compiler warnings and style preferences.

AssemblyCcode
0 likes · 5 min read
Is for(;;) Faster Than while(1) in C? A Practical Comparison
Programmer DD
Programmer DD
Jun 19, 2020 · Fundamentals

Infinite Loops in Java: while(true) vs for(;;) – Which Is Better?

This article compares the two common ways to write infinite loops in Java—while(true) and for(;;)—exploring their origins, usage differences, and performance by examining JDK source counts and compiled bytecode, concluding they are functionally equivalent.

Javafor loopinfinite loop
0 likes · 5 min read
Infinite Loops in Java: while(true) vs for(;;) – Which Is Better?
Java Backend Technology
Java Backend Technology
Oct 24, 2018 · Backend Development

Why My Java App Hits 100% CPU: Live Infinite Loop Demo & Diagnosis

This article walks through setting up a Vagrant‑based experiment that injects an intentional infinite loop into a simple Spring MVC service, then demonstrates step‑by‑step how to identify the offending process using top, examine JVM heap with jstat, and trace the problematic thread with jstack to resolve a CPU‑100% issue.

CPUJVMJava
0 likes · 4 min read
Why My Java App Hits 100% CPU: Live Infinite Loop Demo & Diagnosis
Aotu Lab
Aotu Lab
Jul 21, 2017 · Frontend Development

How to Build a 5‑Image Infinite Swiper with Custom Gestures and Dynamic Layout

This article walks through designing and implementing a five‑image Swiper component that supports left‑right swipe gestures, infinite looping, and any number of images, detailing gesture handling, circular‑list data structures, rendering logic, performance optimizations, and edge‑case fixes with complete JavaScript code examples.

Carouselgestureinfinite loop
0 likes · 11 min read
How to Build a 5‑Image Infinite Swiper with Custom Gestures and Dynamic Layout