arXiv:2511.02897cs.NEcs.AI2025-11

对比三种位串实现,为线性遗传编程选型提供平台适配建议。

Performance Evaluation of Bitstring Representations in a Linear Genetic Programming Framework

  • 自研直接实现位串在Linux和Windows上最快
  • std::bitset在macOS上表现最优,整体最稳定
  • boost::dynamic_bitset灵活但较慢,适合复杂场景

不同位串表示方法会带来不同的计算性能。本文在C++中比较了三种位串实现:std::bitset、boost::dynamic_bitset和自研直接实现,在线性遗传编程框架的拼接操作中进行基准测试。测试覆盖macOS、Linux和Windows MSYS2三个平台,以评估平台相关的性能差异。结果表明,自研直接实现在线性遗传编程系统中于Linux和Windows上表现最佳,std::bitset在macOS上性能最优;尽管整体较慢,boost::dynamic_bitset仍具可行性和灵活性。研究揭示了编译器优化与系统架构对性能的重要影响,为根据平台和应用需求选择最优实现提供了实用指导。

原文摘要 · Abstract (English)

Different bitstring representations can yield varying computational performance. This work compares three bitstring implementations in C++: std::bitset, boost::dynamic_bitset, and a custom direct implementation. Their performance is benchmarked in the context of concatenation within a Linear Genetic Programming system. Benchmarks were conducted on three platforms (macOS, Linux, and Windows MSYS2) to assess platform specific performance variations. The results show that the custom direct implementation delivers the fastest performance on Linux and Windows, while std::bitset performs best on macOS. Although consistently slower, boost::dynamic_bitset remains a viable and flexible option. These findings highlight the influence of compiler optimisations and system architecture on performance, providing practical guidance for selecting the optimal method based on platform and application requirements.

遗传编程性能优化位串

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。