[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Overhead of the R interface
From: |
Gábor Csárdi |
Subject: |
[igraph] Overhead of the R interface |
Date: |
Sat, 20 Jun 2009 01:03:24 +0200 |
Dear List,
this topic came the other day, and I did a small experiment. The same
thing was run in C and R: generation of random and scale free graphs,
generating graphs with a given degree sequence, removing multiple and
loop edges, betweenness, transitivity and closeness calculation.
Everything was run using igraph 0.6. Files are attached.
I run both of them five times and the total running time is 50.057
seconds (C code) versus 54.98 seconds (R code). I.e. the overhead in
this case is less than ten percent: 54.98/50.057 = 1.098348.
Of course this is just a toy experiment and does not prove anything.
For another piece of code the difference can be bigger, or even
smaller.
Best Regards,
Gabor
--
Gabor Csardi <address@hidden> UNIL DGM
speedtest.c
Description: Text Data
speedtest.R
Description: Binary data
- [igraph] Overhead of the R interface,
Gábor Csárdi <=