<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>benchmark on Nan Xiao | 肖楠</title>
    <link>https://nanx.me/tags/benchmark/</link>
    <description>Recent content in benchmark on Nan Xiao | 肖楠</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 24 Mar 2025 20:05:00 +0000</lastBuildDate>
    <atom:link href="https://nanx.me/tags/benchmark/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Optimize R foreach loops for parallelism: avoid the .combine argument</title>
      <link>https://nanx.me/blog/post/r-foreach-combine/</link>
      <pubDate>Mon, 24 Mar 2025 20:05:00 +0000</pubDate>
      <guid>https://nanx.me/blog/post/r-foreach-combine/</guid>
      <description>Cute boat in a glass bottle. Art generated by FLUX.1 [dev] + cozy-book-800 LoRA adapter. The benchmarking script used in this post is available as a GitHub Gist.&#xA;This post recommends avoiding the use of foreach(.combine = &#34;rbind&#34;) in parallel loops in R. Instead, manually combine the results after the foreach() call using functions like data.table::rbindlist() or dplyr::bind_rows().&#xA;Performance issues with rbind() The do.call(rbind, list) pattern in R is an expressive and functional way to bind data frames from a list into a single data frame.</description>
    </item>
  </channel>
</rss>
