基准用于测试C和C ++分配器? [英] Benchmarks used to test a C and C++ allocator?

查看:139
本文介绍了基准用于测试C和C ++分配器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请上用于测试的C和C ++分配基准请告知?满足以下任一基准方面考虑:

Please kindly advise on benchmarks used to test a C and C++ allocator? Benchmarks satisfying any of the following aspects are considered:


  1. 速度

  2. 碎片

  3. 并发

谢谢!

推荐答案

如果你问一个C / C ++程序的一般分配器然后我发现本文中的囤地:一个可扩展的内存分配器为它认为这个问题多线程应用。这是引自本文件

If you ask about a general allocator for a C/C++ program then I have found this paper Hoard: A Scalable Memory Allocator for Multithreaded Applications which considers this question. This is a quote from this document

有是因为还没有标准套房
  基准评估
  多线程分配器。我们知道的
  没有基准,明确强调
  服务器多线程性能
  应用,如Web服务器和1
  数据库管理。我们选择的基准
  在其他论文中描述和
  否则发表(该拉尔森
  从Larson和克里希南基准
  [22]及从shbench基准
  MicroQuill公司[26]),两个
  多线程应用程序而
  包括基准(BEMengine [7]和
  巴恩斯小屋[1,2]),并写了一些
  我们自己的微基准压力
  内存分配的不同方面
  性能(threadtest,积极假,
  被动假)。

There is as yet no standard suite of benchmarks for evaluating multithreaded allocators. We know of no benchmarks that specifically stress multithreaded performance of server applications like web servers 1 and database managers. We chose benchmarks described in other papers and otherwise published (the Larson benchmark from Larson and Krishnan [22] and the shbench benchmark from MicroQuill, Inc. [26]), two multithreaded applications which include benchmarks (BEMengine [7] and barnes-hut [1, 2]), and wrote some microbenchmarks of our own to stress different aspects of memory allocation performance (threadtest, active-false, passive-false).

这纸是有点老了。不过,我最近看到了HP-UX的分配器( MallocNextGen )和惠普也不能保证它是良好的所有可能的应用。它说:

This paper is sort of old. However I have seen recently an allocator for HP-UX (MallocNextGen) and HP also can't ensure that it is good for all possible applications. It says:

新的分配一般为
  有望改善的性能
  应用程序。然而,可能有
  一些应用程序,其
  性能可能会降低。因此,用户
  建议其基准
  用默认的内存应用
  在分配libc和与
  在分配之前libmallocng使用
  在生产新的分配器
  环境。

The new allocator is generally expected to improve the performance of applications. However, there may be some applications for which performance may degrade. Hence users are advised to benchmark their applications with the default memory allocator in libc and with the allocator in libmallocng before using the new allocator in a production environment.

至于速度和并发我自己的经验是,你必须为了比较两种不同的分配器来衡量自己的程序的性能。如果我们谈论的Linux可以使用LD_ preLOAD以加载不同的分配器。

As for speed and concurrency my own experience is that you have to measure performance of your own program in order to compare two different allocators. If we talk about Linux you can use LD_PRELOAD in order to load different allocators.

这篇关于基准用于测试C和C ++分配器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆