Tagged articles
String Concatenation
31 articles · Page 1 of 1
This article explains Java String immutability, the hidden object creation behind '+' concatenation across JDK versions, StringBuilder and StringBuffer internals, constant pool behavior, and the invokedynamic optimization in JDK 9+, with bytecode examples and performance best practices.
Constant PoolJVMJava
0 likes · 16 min read

The article explains that in Python the + operator joins two strings into one, demonstrates this with code examples, and warns that adding a number to a string raises a TypeError, illustrating the rule with sample output and error messages.
Arithmetic operatorsPythonString Concatenation
0 likes · 3 min read

This article compares Python's + operator and the .join() method for concatenating strings, showing how .join() offers clearer code and up to four‑times better performance by reducing memory allocations, especially when joining many strings.
Coding TipsPythonString Concatenation
0 likes · 6 min read

This article explains how PHP's implode() function joins array elements into strings, covering basic usage with delimiters, handling nested arrays, and the special case of omitting the glue argument for seamless concatenation.
BackendString Concatenationarray
0 likes · 4 min read

This article explains how using the + operator for string concatenation in Java creates multiple immutable objects, why StringBuilder offers a memory‑efficient alternative, and analyzes two interview‑style code snippets with bytecode to reveal the exact number of objects each statement generates.
JVMJavaString Concatenation
0 likes · 9 min read

This article compares Java string concatenation using the '+' operator versus StringBuilder, showing that for simple cases '+' is equally fast and more concise, while in loops StringBuilder dramatically outperforms '+' due to reduced object creation overhead.
JUnitString ConcatenationStringBuilder
0 likes · 8 min read

This article investigates the performance differences between Java’s ‘+’ operator, StringBuilder, and StringJoiner for string concatenation, presenting JUnit benchmark results for single and looped concatenations, analyzing compiled bytecode, and concluding when each method is optimal for readability and speed.
JUnitString ConcatenationStringBuilder
0 likes · 7 min read

This article examines eight common Java string concatenation techniques, benchmarks them with JMH, presents the performance results—including a clear ranking where the '+' operator outperforms others—and provides a downloadable Spring Boot 3 case collection for deeper learning.
JMHSpring BootString Concatenation
0 likes · 9 min read

This article presents a comprehensive overview of seven Python string concatenation techniques—including the plus operator, comma printing, implicit literal concatenation, percent formatting, format method, join function, f‑strings, and the multiplication operator—along with performance tips and usage recommendations.
String Concatenationperformanceprogramming
0 likes · 5 min read

This article traces the evolution of Java string concatenation from the simple '+' operator through JDK 8’s StringBuilder implementation, the JDK 9+ StringConcatFactory with invokedynamic, and Alibaba’s PR 20273 that introduces hidden‑class bytecode generation, highlighting performance gains and startup‑time improvements.
JDKMethodHandlesOpenJDK
0 likes · 17 min read

This article investigates the performance differences between Java’s ‘+’ operator and StringBuilder for both simple and looped string concatenations, presenting JUnit benchmark results that show ‘+’ is comparable for single concatenations but significantly slower in loops, and recommends using the appropriate method based on context.
JavaString ConcatenationStringBuilder
0 likes · 6 min read

This article examines Java string concatenation performance by comparing the '+' operator and StringBuilder in both simple and loop scenarios, presenting JUnit test results, bytecode analysis, and practical recommendations for choosing the most efficient approach.
JUnitJavaString Concatenation
0 likes · 6 min read

This article examines the performance differences between using the '+' operator and StringBuilder for string concatenation in Java, presenting JUnit benchmark tests for simple concatenations and looped concatenations, analyzing compiled bytecode, and concluding that '+' is suitable for simple cases while StringBuilder excels in loops.
JUnitJavaString Concatenation
0 likes · 7 min read

This article presents a collection of straightforward Python techniques—such as list comprehensions, external length calculation, set usage, early‑exit loops, inlining functions, pre‑computations, generators, map(), memoization, NumPy vectorization, filterfalse, and join()—that can accelerate for‑loops anywhere from 1.3‑fold up to nearly a thousand‑fold, with explanations and benchmark results.
Loop OptimizationNumPyPython
0 likes · 18 min read


IT NiukeDec 27, 2023 · Backend Development
The article investigates IntelliJ IDEA's suggestion to replace StringBuilder with the '+' operator, showing that for simple concatenations the compiled code is identical and performance comparable, while in loops '+' becomes inefficient and StringBuilder remains preferable.
IntelliJ IDEAJUnitJava
0 likes · 8 min read

This article examines Java string concatenation performance, comparing the '+' operator and StringBuilder in both simple and loop scenarios, presenting JUnit benchmark results, bytecode analysis, and concluding that '+' is sufficient for single concatenations while StringBuilder excels in loops.
JavaString ConcatenationStringBuilder
0 likes · 7 min read

This article evaluates the execution time and bytecode differences of simple and looped string concatenation in Java, comparing the '+' operator with explicit StringBuilder usage, and concludes that '+' is fine for single concatenations while StringBuilder dramatically outperforms '+' in iterative scenarios.
JavaString Concatenationperformance
0 likes · 9 min read

An empirical study compares Java string concatenation using the '+' operator versus StringBuilder, showing that for simple concatenations '+' is equally efficient and more concise, while in loops '+' incurs significant overhead, making StringBuilder the preferred choice for iterative concatenation.
JUnitJavaString Concatenation
0 likes · 6 min read

The article explains why using the '+' operator for string concatenation in Java creates many temporary objects, how the StringBuilder class and compile‑time optimizations can avoid this overhead, and demonstrates object‑creation counts for two typical interview questions using javap bytecode inspection.
BackendJavaJavap
0 likes · 10 min read

This article explains how to transform a nested Python list of label‑value pairs into a single formatted string using simple loops and list comprehensions, providing clear code examples and step‑by‑step explanations for beginners.
Code TutorialString Concatenationlist manipulation
0 likes · 5 min read

This article demonstrates how to de‑duplicate rows and concatenate string values within each id‑type group in a pandas DataFrame using drop_duplicates, groupby, agg, set, unique, and str.join techniques.
PandasString Concatenationduplicate removal
0 likes · 6 min read

This article compares five Java string‑concatenation techniques—‘+’, String.concat(), StringUtils.join(), StringBuffer.append() and StringBuilder.append()—through extensive timing tests from 100 to 900 000 iterations, revealing their speed, memory usage and best use cases for large‑scale data processing.
Apache CommonsJavaString Concatenation
0 likes · 11 min read

This article reviews eight common Python string concatenation techniques—including the + operator, commas, direct adjacency, % formatting, format(), join(), f‑strings, and the * operator—explaining their syntax, use cases, performance considerations, and recommendations for small versus large-scale concatenations.
String Concatenationf-stringformat
0 likes · 3 min read

This article investigates Java's string concatenation behavior, demonstrating through two examples why some concatenations invoke StringBuilder while others are optimized by the compiler, and explains the underlying bytecode differences revealed by decompiling with javap.
JavaJavapString Concatenation
0 likes · 3 min read

This article examines why identical-looking string concatenations in Java sometimes use StringBuilder and other times are optimized away, showing bytecode differences, explaining compiler behavior, and summarizing the conditions that affect reference equality.
JVMString ConcatenationStringBuilder
0 likes · 4 min read

The author investigates the common advice against using the += operator for string concatenation by writing two Java programs, examining their bytecode with javap, and comparing results on Oracle JDK 8 and OpenJDK 14, revealing that JDK version and implementation affect whether a StringBuilder is automatically used.
JDKJavaString Concatenation
0 likes · 5 min read

This article presents a comprehensive overview of eight different techniques for joining strings in Python, covering simple operators, formatting methods, built‑in functions, and best‑practice recommendations for both small and large concatenations.
PythonString Concatenationf-string
0 likes · 4 min read

This article reviews seven common Python string‑concatenation techniques—including +, commas, direct literals, %, format(), join(), f‑strings, and *—and explains when each method is most suitable for small or large string assemblies.
String Concatenationf-stringformat
0 likes · 4 min read

This article explains Java string concatenation methods—including the + operator, concat, StringBuilder, StringBuffer, and StringUtils.join—covers their underlying implementations, compares their performance, and provides practical recommendations for efficient and thread‑safe usage.
JavaString ConcatenationStringBuilder
0 likes · 9 min read

This article reviews seven common Python string concatenation techniques—including the plus operator, commas, direct literals, the % operator, format(), f-strings, join(), and the multiplication operator—highlighting their syntax, use cases, and performance considerations for both small and large strings.
String Concatenationf-stringformat
0 likes · 4 min read

This guide reviews eight common Python string concatenation techniques—including the plus operator, commas, direct literals, percent formatting, format(), f-strings, join(), and the multiplication operator—highlighting their syntax, use cases, performance considerations, and recommendations for small versus large string assemblies.
String Concatenationf-stringformat
0 likes · 4 min read
