Tagged articles
Struct
24 articles · Page 1 of 1
The article dissects Milvus 3.0's Struct and EmbList design for storing and querying multi‑vector documents, compares flattening, JSON and named‑vector approaches, explains storage constraints, row‑level vs element‑level search semantics, MAX_SIM integration, a sealed‑segment bug, and practical checklist recommendations.
Array of StructsEmbListHybrid Search
0 likes · 19 min read

In Go, using a range loop on slices of large structs implicitly copies each element, leading to significant performance loss, and modifying the loop variable does not affect the original slice; this article explains the copying behavior, benchmarks three loop styles, and offers practical guidelines to write fast and correct code.
Structbenchmarkperformance
0 likes · 9 min read

This article explains the natural alignment requirements of C/C++ data types, how structs are padded and aligned based on member alignments, the hardware, cache and compiler reasons for alignment, and the concept of over‑aligned types with practical examples and usage guidelines.
C++C++Compiler
0 likes · 11 min read

This article explains the concept of flexible arrays in C, compares them with pointer‑based arrays, shows allocation and deallocation code, and discusses memory continuity, performance, fragmentation risk, and suitable usage scenarios for embedded systems.
C++EmbeddedStruct
0 likes · 5 min read

This article explains Go's memory alignment concepts, why alignment is needed, demonstrates real-world layout differences with examples, discusses performance and portability impacts, and introduces tools like fieldalignment and structlayout to detect and fix alignment issues in Go programs.
Structmemory alignmenttooling
0 likes · 14 min read

This article demonstrates step‑by‑step how Go's reflection and unsafe packages can be leveraged to bypass the language's encapsulation, allowing reading, writing, and even assigning unaddressable private struct fields by manipulating internal flag bits and using low‑level pointer tricks.
GoReflectionStruct
0 likes · 13 min read

This guide explains core C programming concepts—including bitwise operators, macro definitions, conditional compilation directives, extern declarations, typedef aliases, struct usage, and the static keyword—providing clear examples and code snippets to help developers write more efficient and maintainable code.
C++Conditional CompilationMacros
0 likes · 10 min read

The article explains how encapsulating peripheral registers in a struct rather than using separate global variables reduces literal‑pool usage, cuts instruction count, and improves execution speed on Cortex‑A9, providing step‑by‑step assembly analysis, compilation commands, and further optimization techniques.
C++Cortex-A9Struct
0 likes · 9 min read

This article explains how Go's native structs and interfaces can replace traditional Data Transfer Objects, offering a more concise, performant, and maintainable way to move data across application layers while highlighting best‑practice patterns and potential pitfalls.
BackendDTOData Transfer
0 likes · 8 min read

This article explains Go's static type system, how types and interfaces work, the role of the empty interface, and demonstrates using the reflect package to inspect and modify values, including structs, with practical code examples and type assertions.
GoReflectionStruct
0 likes · 15 min read

This article explains Go's powerful reflection feature, walks through importing the reflect package, outlines the step‑by‑step process to obtain Type and Value objects, and provides complete code examples that read, modify, and display struct fields while noting performance considerations.
GoReflectionStruct
0 likes · 5 min read

This article explores the various ways to compare structs, slices, maps, and other Go types, explaining when the == operator is applicable, why it fails for certain types, and how alternatives like reflect.DeepEqual, cmp.Equal, and testify can be used effectively.
CMPGoStruct
0 likes · 11 min read

This comprehensive guide walks you through Go structs—covering their definition, instantiation, methods, receivers, anonymous fields, embedding, and method expressions—while providing clear code examples and practical guidelines for effective use in Go programming.
BackendEmbeddingGo
0 likes · 9 min read

This article compares Java classes with Go structs, covering how each language handles state and behavior, inheritance versus composition, and visibility rules, while providing concrete code examples to illustrate the practical differences for developers.
GoInheritanceJava
0 likes · 6 min read

This guide explains C structs—from basic definitions and declaration styles to memory alignment, byte sizing, bit‑field handling, nested structures, and using structs as function parameters—providing clear code examples and practical tips for efficient embedded and systems programming.
C++EmbeddedInitialization
0 likes · 29 min read

The article explains that Swift’s nil differs from Objective‑C’s null pointer by representing ‘no value’ for any type through optionals, details how various optionals (Bool?, String?, class?, enum?) are encoded in memory, shows the extra byte cost for Int?, and advises minimizing optional Int fields in structs, using 0 when appropriate.
EnumSWIFTStruct
0 likes · 6 min read

This article provides a comprehensive guide to C structures, covering declaration, variable definition, typedef aliases, initialization methods, pointer usage, member access, memory layout, nested structs, and bit fields, complete with code examples and visual illustrations to help readers understand and apply these concepts effectively.
C++Memory LayoutStruct
0 likes · 12 min read

The article demonstrates how to examine a running Go program’s memory layout by defining example structs, using unsafe.Sizeof/Alignof, dumping writable regions via a Bash script and GDB, and locating fields and string constants in the resulting memory dumps to verify object representation.
GoHeap InspectionLinux
0 likes · 27 min read

This article explains how to handle JSON in Go, comparing the generic map[string]interface{} approach with strongly‑typed struct unmarshalling, demonstrating tag usage, and introducing third‑party libraries like SJSON and GJSON that simplify reading and writing JSON data.
GoStructgjson
0 likes · 8 min read
![Master JSON Parsing in Go: map[string]interface{} vs Struct Tags & Libraries](https://wsrv.nl/?url=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FQFzRdz9libEbODbtdrvgibRhxAZjuFiaEC99NaVesbK8LGFPDSk2Dnq0DrfHLAxohKdn81sxGWbD4eMY7JLr0XrHg%2F0%3Fwx_fmt%3Djpeg)
This article explains why processing JSON in a statically‑typed language like Go can be cumbersome, demonstrates two basic approaches—using map[string]interface{} and struct tags—highlights their limitations, and introduces third‑party libraries such as SJSON and GJSON that make JSON reading and writing more concise and efficient.
BackendJSONSerialization
0 likes · 9 min read

This article explains how Python's struct module enables conversion between bytes and other binary data types, covering its purpose, common uses, format strings, alignment rules, format characters, and practical packing/unpacking examples with code snippets and tables.
StructTutorialbinary-data
0 likes · 6 min read

This article introduces Python’s struct module, explaining how it converts between bytes and other binary data types, detailing its functions, format strings, alignment options, and practical examples of packing, unpacking, and size calculation for efficient binary data handling.
PythonStructbinary data
0 likes · 6 min read

This article explains Go's method sets, the relationship between method receivers and method sets, how interfaces work, and the role of embedding, providing code examples that illustrate value vs pointer receivers, interface implementation rules, and embedding differences for struct types.
EmbeddingStructinterface
0 likes · 10 min read

This article explores Swift's memory model and pointer mechanics, explains how HandyJSON converts JSON to class instances without runtime support, demonstrates MemoryLayout utilities, and shows practical techniques for modifying struct and class properties directly in memory.
JSON parsingMemory LayoutSWIFT
0 likes · 17 min read
