Attached is the simulation script.
In it there is a block of code that uses igraph to create two networks and then 
calculate neighbourhoods of the networks.
To test the effects of igraph there is a block of code immediately following 
that creates a list of artificial neighbourhoods.

The version with the igraph networks seems to take about 70 times as long to 
run as the version with the artificial networks.

Thanks for your help.
Robin Cowan
PS. I also attach the output of Rprof() for the two versions. When I did it I 
thought the issue was R so they are labelled Rprof-3-1-3 (which uses igraph 
0.7) and Rprof-3-5-1 (which uses igraph 1.x)


###### ########
#some system times
##############
#R version 3.5.1
# > system.time(source("simulationR-R.R"))
#   user  system elapsed 
# 77.300   0.570  77.389 

# > sessionInfo()
# R version 3.5.1 (2018-07-02)
# Platform: x86_64-apple-darwin15.6.0 (64-bit)
# Running under: macOS Sierra 10.12.6

# Matrix products: default
# BLAS: 
/Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
# LAPACK: 
/Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

# locale:
# [1] C

# attached base packages:
# [1] stats     graphics  grDevices utils     datasets  methods   base     

# other attached packages:
# [1] igraph_1.2.2

# loaded via a namespace (and not attached):
# [1] compiler_3.5.1  magrittr_1.5    pkgconfig_2.0.2

#########
## 3.1.3
# user  system elapsed 
# 0.648   0.005   0.648 

# > sessionInfo()
# R version 3.1.3 Patched (2015-04-21 r70342)
# Platform: x86_64-apple-darwin10.8.0 (64-bit)
# Running under: OS X 10.9.5 (Mavericks)

# locale:
# [1] C

# attached base packages:
# [1] stats     graphics  grDevices utils     datasets  methods   base     

# other attached packages:
# [1] igraph_0.7.1


#########
### from a colleague:
# R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
# Platform: x86_64-w64-mingw32/x64 (64-bit)

#  user  system elapsed 
# 72.94    0.02   72.99 




######################
###  starts here
######################

#### compiling or not compiling doesn't change the relative speeds of the two 
versions
# library(compiler)
# enableJIT(3)

library(igraph)

 
#### a function used later
 
 PlaytheGame=function(i11=i,opp1=opp){
                P=sum(PayoffMatrix[strategy[i11],strategy[opp1]])       
 return(P/length(opp1))  
 } # Play the Game

 
 #### set some parameters (this is a game theory simulation, played on a 
network)
 
 ### payoff matrix for the game
 b=1.5
 PayoffMatrix<-matrix(c(1,0,b,0),nrow=2,ncol=2,byrow=TRUE)
 
 #each player plays Total Rounds of the game
 TotalRounds<-100

 ## how often to write data
 writefreq=20
 
 #number of agents
 num<-100
 # density of the network
 dens<-0.10
 avgdeg<-dens*num/2


# create filenames to write output into
 filename=paste("R-R")
 filename2=paste("moran,R-R,g")
 filename3=paste("moran,R-R,gk")


# delete old datafiles
if (file.exists(filename)) file.remove(filename)
if (file.exists(filename2)) file.remove(filename2)
if (file.exists(filename3)) file.remove(filename3)

# how many opponents to play at each round
 numoppon<-1
 
 ### create the networks to play the game on
 # notice that these are here to test the speed of the simulation
 # in principle they should be inside the repetitions loop.
 # I moved them here to see if igraph is causing the problem,
 # igraph is only called here now instead of each time the experiment repeats.
 # Below you can see these commented out. You can check the effects of igraph 
by uncommenting them below.
 # I concluded the problem is not igraph. Sadly.
 
 # create the networks to play on
 repeat{
 g<-erdos.renyi.game(num,dens)
 if(is.connected(g)){break}
 } # repeat
 neigh<-neighborhood(g,order=1)

repeat{
 gk<-erdos.renyi.game(num,dens)
 if(is.connected(gk)){break}
 } # repeat
 neighGk<-neighborhood(gk,order=1)
 
  distmatrix<-1/(shortest.paths(g)) 
 diag(distmatrix)<-0 
 
 distmatrix2<-1/(shortest.paths(gk)) 
 diag(distmatrix2)<-0

##############
# make artificial neighbourhoods here to get rid of the igraph calls
# to test the effect of igraph, uncomment the following block
##############
# neigh<-matrix(sample(1:num,num*avgdeg,replace=T),nrow=num)
# n<-as.data.frame(t(neigh))
# neigh<-as.list(n)
# neighGk<-matrix(sample(1:num,num*avgdeg,replace=T),nrow=num)
# n<-as.data.frame(t(neighGk))
# neighGk<-as.list(n)
################
################
 
 ###Here we repeat the experiment 5 times (for the actual project we are 
working on we repeat it 100 times)
 
 for(reps in 1:5){
 
 ### initialize players' strategies
 strategy<-sample(c(1,2),num,replace=TRUE)
 oldstrategy=strategy
 ### set aggregated payoffs to zero for each player
 payoff<-rep(0,num)

########
# for the real thing we make new networks for each repetition
# ignore this section---it is part of the original simulation but not needed to 
check the speed issue
########
 # repeat{
 # g<-erdos.renyi.game(num,dens)
 # if(is.connected(g)){break}
 # } # repeat
 # neigh<-neighborhood(g,order=1)
 

# repeat{
 # gk<-erdos.renyi.game(num,dens)
 # if(is.connected(gk)){break}
 # } # repeat
 # neighGk<-neighborhood(gk,order=1)

 
# distmatrix<-1/(shortest.paths(g)) 
# diag(distmatrix)<-0 
 
# distmatrix2<-1/(shortest.paths(gk)) 
# diag(distmatrix2)<-0

###################
#############  end of the igraph stuff that should be done each time.
 
 
 ####
 # start time here
 ####
 for(r in 1:TotalRounds){
 newstrat=numeric()
 PayVector=numeric()
 
 ## for each player, make him play the game
 
 for (i in 1:num){
 
 ### he plays against his neighbours
 n1=neigh[[i]][-1]
 nopp=max(length(n1),numoppon)
 opp=n1[1]
 if (length(n1)>1){
 opp=sample(n1,nopp)}
 
 ### get a payoff from each opponent played and add to payoffs
 PayVector[i]=PlaytheGame(i,opp)

}# i loop

#### after everyone has played, pick one guy and revise his strategy
chosen.one<-sample(1:num,1) 
#strategy[chosen.one]=ImitateRichestNeighbor(chosen.one,neighGk[[chosen.one]])

###### for the sake of debugging just change strategy randomly
strategy[chosen.one]<-sample(c(0,1),1)

#update payoff records
payoff=payoff+PayVector

### this write statement is not relevant to debugging for speed it seems
#if((r %% writefreq)==0){
#write(file=filename,ncolumns=8,sep=",",x=c(r,sum(strategy==1),mean(payoff),sd(payoff),min(payoff),max(payoff),strategy[which.min(payoff)],strategy[which.max(payoff)]),append=T)
#}
 
### a single run of the experiment ends ends here
} #r loop


##############
### what follows has been commented out to see if the bottleneck was there
# sadly, that didn't help.
##############

# if((sum(strategy)==num) | (sum(strategy)==(num*2))){
#       morant1="allthesame"
#       }else{morant1=Moran.I(strategy,distmatrix)
#               } 
# moranpayoff<-Moran.I(payoff,distmatrix)
# as.character(moranpayoff)
 
# if((sum(strategy)==num) | (sum(strategy)==(num*2))){
#       moran2t1="allthesame"
#       }else{moran2t1=Moran.I(strategy,distmatrix)
#               } 
 
# moranpayoff2<-Moran.I(payoff,distmatrix2)
# as.character(moranpayoff2)
 
#write.table(x=c(as.character(morant1),as.character(moranpayoff)),file=filename2,sep=",",append=T,col.names=F)
#write.table(x=c(as.character(moran2t1),as.character(moranpayoff2)),file=filename3,sep=",",append=T,col.names=F)

print(c("done ",reps))

#### now the reptetition is done.
} #reps loop
$by.self
                      self.time self.pct total.time total.pct
"eval"                     0.28    36.84       0.76    100.00
"sample.int"               0.24    31.58       0.24     31.58
"PlaytheGame"              0.12    15.79       0.16     21.05
"sum"                      0.04     5.26       0.04      5.26
"<Anonymous>"              0.02     2.63       0.02      2.63
"length"                   0.02     2.63       0.02      2.63
"max"                      0.02     2.63       0.02      2.63
"namespaceImportFrom"      0.02     2.63       0.02      2.63

$by.total
                      total.time total.pct self.time self.pct
"eval"                      0.76    100.00      0.28    36.84
"source"                    0.76    100.00      0.00     0.00
"withVisible"               0.76    100.00      0.00     0.00
"sample.int"                0.24     31.58      0.24    31.58
"sample"                    0.24     31.58      0.00     0.00
"PlaytheGame"               0.16     21.05      0.12    15.79
"sum"                       0.04      5.26      0.04     5.26
"doTryCatch"                0.04      5.26      0.00     0.00
"library"                   0.04      5.26      0.00     0.00
"loadNamespace"             0.04      5.26      0.00     0.00
"try"                       0.04      5.26      0.00     0.00
"tryCatch"                  0.04      5.26      0.00     0.00
"tryCatchList"              0.04      5.26      0.00     0.00
"tryCatchOne"               0.04      5.26      0.00     0.00
"<Anonymous>"               0.02      2.63      0.02     2.63
"length"                    0.02      2.63      0.02     2.63
"max"                       0.02      2.63      0.02     2.63
"namespaceImportFrom"       0.02      2.63      0.02     2.63
".Call"                     0.02      2.63      0.00     0.00
"fun"                       0.02      2.63      0.00     0.00
"namespaceImport"           0.02      2.63      0.00     0.00
"runHook"                   0.02      2.63      0.00     0.00

$sample.interval
[1] 0.02

$sampling.time
[1] 0.76
$by.self
                      self.time self.pct total.time total.pct
"as.list"                  4.28     6.02       6.12      8.61
"split_chain"              3.94     5.55      19.94     28.07
"eval"                     3.52     4.95      71.04    100.00
"lapply"                   3.40     4.79      14.86     20.92
"%>%"                      3.08     4.34      42.82     60.28
"unique"                   2.78     3.91       5.24      7.38
"vapply"                   2.38     3.35       4.68      6.59
"FUN"                      2.04     2.87      10.82     15.23
"length"                   1.96     2.76       1.96      2.76
"match.call"               1.90     2.67       3.50      4.93
"[.igraph.vs"              1.76     2.48      69.50     97.83
"unique.default"           1.70     2.39       2.12      2.98
"as.list.default"          1.62     2.28       1.62      2.28
"sapply"                   1.50     2.11      10.36     14.58
"rev"                      1.32     1.86       2.22      3.12
"stopifnot"                1.14     1.60       7.34     10.33
"withCallingHandlers"      1.04     1.46       4.46      6.28
"withVisible"              1.02     1.44      71.04    100.00
"match.fun"                1.02     1.44       1.16      1.63
"doTryCatch"               0.98     1.38       1.92      2.70
"is_pipe"                  0.94     1.32       0.94      1.32
"wrap_function"            0.84     1.18       5.60      7.88
"is_dollar"                0.84     1.18       0.84      1.18
"sys.call"                 0.82     1.15       1.00      1.41
"prepare_first"            0.76     1.07       3.44      4.84
"rev.default"              0.76     1.07       0.90      1.27
"parse_op_args"            0.68     0.96      45.64     64.25
"%in%"                     0.66     0.93       0.80      1.13
"alist"                    0.64     0.90       2.52      3.55
"simplify2array"           0.62     0.87       5.14      7.24
"tryCatch"                 0.60     0.84       3.34      4.70
"$"                        0.60     0.84       0.60      0.84
"add_vses_graph_ref"       0.58     0.82       9.50     13.37
"freduce"                  0.58     0.82       7.92     11.15
"sys.parent"               0.58     0.82       0.58      0.82
"c"                        0.56     0.79      54.04     76.07
"simple_vs_index"          0.54     0.76       0.82      1.15
"is_funexpr"               0.54     0.76       0.56      0.79
"is_igraph"                0.52     0.73       1.32      1.86
"[["                       0.48     0.68       0.48      0.68
"new.env"                  0.48     0.68       0.48      0.68
"unlist"                   0.48     0.68       0.48      0.68
"is_tee"                   0.46     0.65       0.46      0.65
"do_call"                  0.44     0.62      54.74     77.06
"as.pairlist"              0.44     0.62       2.96      4.17
"is_parenthesized"         0.44     0.62       0.54      0.76
"is.factor"                0.42     0.59       0.42      0.59
"["                        0.40     0.56      69.90     98.40
"drop_null"                0.40     0.56       4.04      5.69
"parent.frame"             0.40     0.56       0.40      0.56
"graph_version"            0.38     0.53       7.72     10.87
"is_first"                 0.38     0.53       5.26      7.40
"PlaytheGame"              0.38     0.53       0.44      0.62
"tryCatchList"             0.36     0.51       2.60      3.66
"make_call"                0.36     0.51       0.40      0.56
"isFALSE"                  0.34     0.48       0.52      0.73
"is.call"                  0.34     0.48       0.34      0.48
"lengths"                  0.34     0.48       0.34      0.48
"as.vector"                0.32     0.45       0.32      0.45
"tryCatchOne"              0.30     0.42       2.22      3.12
"sys.function"             0.30     0.42       0.70      0.99
"lazy_dots"                0.30     0.42       0.40      0.56
"list"                     0.30     0.42       0.30      0.42
"c.igraph.vs"              0.28     0.39      53.62     75.48
"_fseq"                    0.28     0.39       8.20     11.54
"any"                      0.28     0.39       0.28      0.39
"is_placeholder"           0.28     0.39       0.28      0.39
"logical"                  0.28     0.39       0.28      0.39
"get_vs_ref"               0.24     0.34       4.80      6.76
"%&&%"                     0.24     0.34       1.08      1.52
"...elt"                   0.24     0.34       0.70      0.99
"get_vs_graph"             0.24     0.34       0.36      0.51
"as.lazy"                  0.24     0.34       0.26      0.37
"warn_version"             0.22     0.31       7.94     11.18
"create_op_result"         0.20     0.28       6.88      9.68
"sample.int"               0.20     0.28       0.32      0.45
"is_function"              0.20     0.28       0.24      0.34
"all"                      0.20     0.28       0.20      0.28
"is.function"              0.18     0.25       0.18      0.25
"is.na"                    0.18     0.25       0.18      0.25
"is_compound_pipe"         0.18     0.25       0.18      0.25
"function_list[[i]]"       0.16     0.23       3.88      5.46
"vertex_attr"              0.16     0.23       0.64      0.90
"environment"              0.16     0.23       0.16      0.23
"is.lazy_dots"             0.16     0.23       0.16      0.23
"make_weak_ref"            0.16     0.23       0.16      0.23
"lazy_eval"                0.14     0.20       2.68      3.77
"as.call"                  0.14     0.20       0.14      0.20
"attr"                     0.14     0.20       0.14      0.20
"function_list[[k]]"       0.12     0.17       3.10      4.36
"class"                    0.12     0.17       0.12      0.17
"unclass"                  0.12     0.17       0.12      0.17
"get_graph_id"             0.10     0.14       3.96      5.57
"vertex.attributes"        0.10     0.14       0.28      0.39
"weak_ref_key"             0.10     0.14       0.10      0.14
"parse_vs_op_args"         0.08     0.11      45.74     64.39
"address"                  0.08     0.11       0.08      0.11
"max"                      0.06     0.08       0.06      0.08
"sample"                   0.04     0.06      33.98     47.83
"anyNA"                    0.04     0.06       0.04      0.06
"is.list"                  0.04     0.06       0.04      0.06
"is.pairlist"              0.04     0.06       0.04      0.06
"names"                    0.04     0.06       0.04      0.06
"loadNamespace"            0.02     0.03       0.04      0.06
"-"                        0.02     0.03       0.02      0.03
"<="                       0.02     0.03       0.02      0.03
"as.lazy.lazy"             0.02     0.03       0.02      0.03
"baseenv"                  0.02     0.03       0.02      0.03
"class<-"                  0.02     0.03       0.02      0.03
"cmp"                      0.02     0.03       0.02      0.03
"conditionMessage"         0.02     0.03       0.02      0.03
"is.null"                  0.02     0.03       0.02      0.03
"lazyLoadDBfetch"          0.02     0.03       0.02      0.03
"nargs"                    0.02     0.03       0.02      0.03
"paste"                    0.02     0.03       0.02      0.03
"print.default"            0.02     0.03       0.02      0.03
"sum"                      0.02     0.03       0.02      0.03
"tolower"                  0.02     0.03       0.02      0.03

$by.total
                        total.time total.pct self.time self.pct
"eval"                       71.04    100.00      3.52     4.95
"withVisible"                71.04    100.00      1.02     1.44
"source"                     71.04    100.00      0.00     0.00
"["                          69.90     98.40      0.40     0.56
"[.igraph.vs"                69.50     97.83      1.76     2.48
"do_call"                    54.74     77.06      0.44     0.62
"c"                          54.04     76.07      0.56     0.79
"c.igraph.vs"                53.62     75.48      0.28     0.39
"parse_vs_op_args"           45.74     64.39      0.08     0.11
"parse_op_args"              45.64     64.25      0.68     0.96
"%>%"                        42.82     60.28      3.08     4.34
"sample"                     33.98     47.83      0.04     0.06
"split_chain"                19.94     28.07      3.94     5.55
"lapply"                     14.86     20.92      3.40     4.79
"FUN"                        10.82     15.23      2.04     2.87
"sapply"                     10.36     14.58      1.50     2.11
"add_vses_graph_ref"          9.50     13.37      0.58     0.82
"_fseq"                       8.20     11.54      0.28     0.39
"warn_version"                7.94     11.18      0.22     0.31
"freduce"                     7.92     11.15      0.58     0.82
"graph_version"               7.72     10.87      0.38     0.53
"stopifnot"                   7.34     10.33      1.14     1.60
"create_op_result"            6.88      9.68      0.20     0.28
"as.list"                     6.12      8.61      4.28     6.02
"wrap_function"               5.60      7.88      0.84     1.18
"is_first"                    5.26      7.40      0.38     0.53
"unique"                      5.24      7.38      2.78     3.91
"simplify2array"              5.14      7.24      0.62     0.87
"get_vs_ref"                  4.80      6.76      0.24     0.34
"vapply"                      4.68      6.59      2.38     3.35
"withCallingHandlers"         4.46      6.28      1.04     1.46
"drop_null"                   4.04      5.69      0.40     0.56
"get_graph_id"                3.96      5.57      0.10     0.14
"function_list[[i]]"          3.88      5.46      0.16     0.23
"match.call"                  3.50      4.93      1.90     2.67
"prepare_first"               3.44      4.84      0.76     1.07
"tryCatch"                    3.34      4.70      0.60     0.84
"function_list[[k]]"          3.10      4.36      0.12     0.17
"as.pairlist"                 2.96      4.17      0.44     0.62
"lazy_eval"                   2.68      3.77      0.14     0.20
"tryCatchList"                2.60      3.66      0.36     0.51
"alist"                       2.52      3.55      0.64     0.90
"rev"                         2.22      3.12      1.32     1.86
"tryCatchOne"                 2.22      3.12      0.30     0.42
"unique.default"              2.12      2.98      1.70     2.39
"length"                      1.96      2.76      1.96     2.76
"doTryCatch"                  1.92      2.70      0.98     1.38
"as.list.default"             1.62      2.28      1.62     2.28
"is_igraph"                   1.32      1.86      0.52     0.73
"match.fun"                   1.16      1.63      1.02     1.44
"%&&%"                        1.08      1.52      0.24     0.34
"sys.call"                    1.00      1.41      0.82     1.15
"is_pipe"                     0.94      1.32      0.94     1.32
"rev.default"                 0.90      1.27      0.76     1.07
"is_dollar"                   0.84      1.18      0.84     1.18
"simple_vs_index"             0.82      1.15      0.54     0.76
"%in%"                        0.80      1.13      0.66     0.93
"sys.function"                0.70      0.99      0.30     0.42
"...elt"                      0.70      0.99      0.24     0.34
"vertex_attr"                 0.64      0.90      0.16     0.23
"$"                           0.60      0.84      0.60     0.84
"sys.parent"                  0.58      0.82      0.58     0.82
"is_funexpr"                  0.56      0.79      0.54     0.76
"is_parenthesized"            0.54      0.76      0.44     0.62
"isFALSE"                     0.52      0.73      0.34     0.48
"[["                          0.48      0.68      0.48     0.68
"new.env"                     0.48      0.68      0.48     0.68
"unlist"                      0.48      0.68      0.48     0.68
"is_tee"                      0.46      0.65      0.46     0.65
"PlaytheGame"                 0.44      0.62      0.38     0.53
"is.factor"                   0.42      0.59      0.42     0.59
"parent.frame"                0.40      0.56      0.40     0.56
"make_call"                   0.40      0.56      0.36     0.51
"lazy_dots"                   0.40      0.56      0.30     0.42
"get_vs_graph"                0.36      0.51      0.24     0.34
"is.call"                     0.34      0.48      0.34     0.48
"lengths"                     0.34      0.48      0.34     0.48
"as.vector"                   0.32      0.45      0.32     0.45
"sample.int"                  0.32      0.45      0.20     0.28
"list"                        0.30      0.42      0.30     0.42
"any"                         0.28      0.39      0.28     0.39
"is_placeholder"              0.28      0.39      0.28     0.39
"logical"                     0.28      0.39      0.28     0.39
"vertex.attributes"           0.28      0.39      0.10     0.14
"as.lazy"                     0.26      0.37      0.24     0.34
"is_function"                 0.24      0.34      0.20     0.28
"all"                         0.20      0.28      0.20     0.28
"is.function"                 0.18      0.25      0.18     0.25
"is.na"                       0.18      0.25      0.18     0.25
"is_compound_pipe"            0.18      0.25      0.18     0.25
"environment"                 0.16      0.23      0.16     0.23
"is.lazy_dots"                0.16      0.23      0.16     0.23
"make_weak_ref"               0.16      0.23      0.16     0.23
"as.call"                     0.14      0.20      0.14     0.20
"attr"                        0.14      0.20      0.14     0.20
"class"                       0.12      0.17      0.12     0.17
"unclass"                     0.12      0.17      0.12     0.17
"weak_ref_key"                0.10      0.14      0.10     0.14
"address"                     0.08      0.11      0.08     0.11
"max"                         0.06      0.08      0.06     0.08
"library"                     0.06      0.08      0.00     0.00
"anyNA"                       0.04      0.06      0.04     0.06
"is.list"                     0.04      0.06      0.04     0.06
"is.pairlist"                 0.04      0.06      0.04     0.06
"names"                       0.04      0.06      0.04     0.06
"loadNamespace"               0.04      0.06      0.02     0.03
"-"                           0.02      0.03      0.02     0.03
"<="                          0.02      0.03      0.02     0.03
"as.lazy.lazy"                0.02      0.03      0.02     0.03
"baseenv"                     0.02      0.03      0.02     0.03
"class<-"                     0.02      0.03      0.02     0.03
"cmp"                         0.02      0.03      0.02     0.03
"conditionMessage"            0.02      0.03      0.02     0.03
"is.null"                     0.02      0.03      0.02     0.03
"lazyLoadDBfetch"             0.02      0.03      0.02     0.03
"nargs"                       0.02      0.03      0.02     0.03
"paste"                       0.02      0.03      0.02     0.03
"print.default"               0.02      0.03      0.02     0.03
"sum"                         0.02      0.03      0.02     0.03
"tolower"                     0.02      0.03      0.02     0.03
"asNamespace"                 0.02      0.03      0.00     0.00
"cb$putconst"                 0.02      0.03      0.00     0.00
"checkConflicts"              0.02      0.03      0.00     0.00
"cmpCall"                     0.02      0.03      0.00     0.00
"cmpCallArgs"                 0.02      0.03      0.00     0.00
"cmpCallSymFun"               0.02      0.03      0.00     0.00
"cmpRepeatBody"               0.02      0.03      0.00     0.00
"cmpSymbolAssign"             0.02      0.03      0.00     0.00
"compile"                     0.02      0.03      0.00     0.00
"compiler:::tryCompile"       0.02      0.03      0.00     0.00
"doWithOneRestart"            0.02      0.03      0.00     0.00
"erdos.renyi.game"            0.02      0.03      0.00     0.00
"genCode"                     0.02      0.03      0.00     0.00
"h"                           0.02      0.03      0.00     0.00
"igraph.match.arg"            0.02      0.03      0.00     0.00
"message"                     0.02      0.03      0.00     0.00
"namespaceImportFrom"         0.02      0.03      0.00     0.00
"packageStartupMessage"       0.02      0.03      0.00     0.00
"print"                       0.02      0.03      0.00     0.00
"registerS3methods"           0.02      0.03      0.00     0.00
"signalCondition"             0.02      0.03      0.00     0.00
"tryInline"                   0.02      0.03      0.00     0.00
"withOneRestart"              0.02      0.03      0.00     0.00
"withRestarts"                0.02      0.03      0.00     0.00

$sample.interval
[1] 0.02

$sampling.time
[1] 71.04

> 

> On 14 Dec 2018, at 15:20, Gábor Csárdi <[email protected]> wrote:
> 
> Well, you'll have to show the code you are running.  Gabor
> On Fri, Dec 14, 2018 at 2:18 PM Robin Cowan
> <[email protected]> wrote:
>> 
>> I have a small simulation that creates a network of agents who then play a 
>> game on the network.
>> I noticed that when I run the simulation under R 3.1.3 igraph 0.7.1 it takes 
>> about 4 seconds.
>> When I run it using R 3.5.1 with igraph 1.2.2 it takes about 4 minutes.
>> 
>> I use igraph to create a network and then extract neighbourhoods. The 
>> neighbourhoods are what is actually used  to get the nodes to play the game.
>> I re-wrote it to remove igraph from the code — to test whether igraph is 
>> the issue, I created a list directly which represented the neighbourhoods.
>> With that elimination of igraph (and no other changes) it takes about 4 
>> seconds under R 3.5.1
>> Some of the maintainers on the R list looked and came tot he same 
>> conclusion. The problem is with igraph changes between 0,7 and 1.2.
>> Has this come to light before?
>> 
>> Thanks,
>> Robin Cowan
>> 
>> 
>> 
>> _______________________________________________
>> igraph-help mailing list
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
> 
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to