`
mryufeng
  • 浏览: 982333 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
一直以来 erlang的几本书的作者都建议不要用process dict,倒不是它的性能不好,而是因为process dict破坏了fp的变量不可变语义,所以引起了不好的印象。其实在很多场合,是很合用的。process dict 有几个好处: 1. 无锁,所以高速。 2. hash实现。 3. 内容参与gc。 4. 实现的很细致。 5. 变量可变。 以下是试验: root@nd-desktop:~# cat dicttest.erl -module(dicttest). -export([test_put/1, test_get/1]). test_put(N)->     Start ...
原文地址:http://www.trapexit.org/Adding_my_own_BIF Adding my own BIF From Erlang Community caveat unless you really know what you're doing, you'll be better off using a linked-in driver or a port. steps     1. run configure     2. add your bifs to erts/emulator/beam/bif.tab bif re:grep/2 bif re:co ...
原文地址:http://www.lshift.net/blog/2006/09/10/how-fast-can-erlang-send-messages My previous post examined Erlang’s speed of process setup and teardown. Here I’m looking at how quickly messages can be sent and received within a single Erlang node. Roughly speaking, I’m seeing 3.4 million deliveries per ...
原文地址: http://www.lshift.net/blog/2006/09/10/how-fast-can-erlang-create-processes Very fast indeed. 1> spawntest:serial_spawn(1). 3.58599e+5 That’s telling me that Erlang can create and tear down processes at a rate of roughly 350,000 Hz. The numbers change slightly - things slow down - if I’m ...
pdf下载地址: http://people.redhat.com/drepper/cpumemory.pdf 作者Ulrich Drepper介绍 http://en.wikipedia.org/wiki/Ulrich_Drepper 这个pdf系统地讲述了 cpu和内存,指令执行器 L1 L2 Cache等等的关系, 最关键的是它说了程序员如何利用这些特性去提高性能,对于写高性能的程序非常有帮助, 强烈推荐!!!
erlang的hipe相当于jit, 根据语言评测有hipe支持在纯erlang的运算上会快2-3倍,这个性能的提升对于计算密集型的应用还是比较可观的。以下是如何启用hipe: 先看下erl的版本: root@nd-desktop:~# erl Erlang R13B01 (erts-5.7.2) [source] [smp:2:2] [rq:2] ...
曾经花了很多时间折腾编译原理,大部分的程序不是字符串处理就是文法和语法分析,这个技术对于提高技术素质非常帮助。想起来折腾了lex yacc boost spirt lpeg lemon ragel leex yecc。 这些名词的背后是不同的语言 不同的平台 不同的思想的东西。 从上个版本erlang添加了leex以后,我非常渴望能够把它用于实际项目中去, 准备多花点时间在上面, 有兴趣的同学一起来哦。
Some known bottlenecks to address: 1. Improved handling of process table 2. Separate allocators per scheduler 3. Delayed dealloc (let the right scheduler do it) 4. Use NUMA info for grouping of schedulers 5. Separate poll sets per scheduler (IO) 6. Support Scheduler bindings, cpu_topology on Windows ...
原文地址:http://erlang-factory.com/upload/presentations/105/KennethLundin-ErlangFactory2009London-AboutErlangOTPandMulti-coreperformanceinparticular.pdf Migration logic * Strive to keep the maximum number of run able processes equal on all schedulers * Load balancing is performed by the scheduler that ...
Erlang Programming, A Concurrent Approach to Software Development by Francesco Cesarini and Simon Thompson is planned to be published by O'Reilly before the summer. 现在来了, 有人贴在ecug上。这本书写的不错,补充了the book遗漏的不少topic, 在程序的语法的细节上很详细。 附件是书原版.
erlang的变量是不可变的 这是语法层面的事情,照理是绕不过的。但是hipe,erlang的jit模块打开了这扇门,请看: sf bay facory 来自Facebook的Eugene Letuchy在ppt http://www.erlang-factory.com/upload/presentations/31/EugeneLetuchy-ErlangatFacebook.pdf 里面提到: hipe_bifs Cheating single assignment ▪ Erlang is opinionated: ▪ Destructive assignment is hard be ...
原文地址:http://erlang.org/pipermail/erlang-questions/2008-September/037905.html 还是老大们解释这个比较轻松 源码参见 erl_db.c 2008/9/3 Valentin Micic <> >  Is ETS utilizing the same locking policy for all table types (namely: > public, protected or private), and if so, would it be possible to relax > l ...
erlang的表达式如果不用的话,会警告的,但是有些又不警告,比较奇怪,做了下试验,再看了compiler的源码有了以下的结果: root@yufeng-desktop:~# nl expr.erl      1  -module(expr).      2  -export([test/0]).      3  test()->      4      1,      5      1.0,      6      [],      7      [1,2,3],      8      <<>>,      9      <<1,2,3>&g ...
原文地址 http://noss.github.com/2009/04/02/constant-pool-erlang-hack.html 2009-04-02 Erlang R12B-0 added a per-module memory area for constants, the literal values in a module are stored there. Before, they were allocated on the heap every time they were referenced. This meant that some kinds of optimiz ...
原文地址:http://prog21.dadgum.com/16.html Given its "soft real time" label, I expected Erlang to use some fancy incremental garbage collection approach. And indeed, such an approach exists, but it's slower than traditional GC in practice (because it touches the entire the heap, not just the liv ...
Global site tag (gtag.js) - Google Analytics