This is an automated email from the ASF dual-hosted git repository.
paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/main by this push:
new c7a12365 chore(dev/benchmarks): Reorganize benchmarks such that they
can build/run against previous versions (#398)
c7a12365 is described below
commit c7a123659b7e6a7e10fc849b0af1e0ec904f3666
Author: Dewey Dunnington <[email protected]>
AuthorDate: Thu Mar 14 17:06:13 2024 -0300
chore(dev/benchmarks): Reorganize benchmarks such that they can build/run
against previous versions (#398)
I imagine there are a few ways to go about this, but I found moving the
benchmarks to their own subdirectory and using `FetchContent` to build
against various versions/source checkouts to be an intuitive way to do
this. This also nicely separates benchmark-related CMake from
non-benchmark related CMake and provides a nice way to benchmark locally
against a few previous versions (via build presets). If we add more
benchmarks in the future (or discover a flaw in an existing benchmark),
it also provides a nice way to retrospectively run them against previous
releases.
I've added a more verbose description of the setup to the benchmarks
README, but the general idea is:
- Benchmarks are documented using Doxygen, which is really good at
parsing documentation. Reading the XML is a bit of a pain but is better
than undocumented or difficult-to-locate benchmarks and better than
parsing source files yourself.
- Configurations are CMake build presets, and CMake handles pulling a
previous or local nanoarrow using `FetchContent`. This means that the
only action needed on release to update the report is to add a configure
preset.
- The provided `benchmark-run-all.sh` effectively reuses build
directories for minimal rebuilding during benchmark development.
- The report is a [Quarto](https://quarto.org) document that renders to
markdown. It is not the flashiest of reports but gets the job done. It
could be replaced by something like
[conbench](https://github.com/conbench/conbench) in the future.
Example report in details below:
<details>
# Benchmark Report
## Configurations
These benchmarks were run with the following configurations:
| preset_name | preset_description |
|:------------|:-------------------------------------------------|
| local | Uses the nanoarrow C sources from this checkout. |
| v0.4.0 | Uses the nanoarrow C sources the 0.4.0 release. |
## Summary
A quick and dirty summary of benchmark results between this checkout and
the last released version.
| benchmark_label | v0.4.0 | local | change | pct_change |
|:----------------------------------------------------------------------------|---------:|---------:|--------:|-----------:|
| [ArrayViewGetIntUnsafeInt16](#arrayviewgetintunsafeint16) | 635.33µs |
631.47µs | 1ns | -0.6% |
| [ArrayViewGetIntUnsafeInt32](#arrayviewgetintunsafeint32) | 635.96µs |
636.71µs | 753.7ns | 0.1% |
| [ArrayViewGetIntUnsafeInt64](#arrayviewgetintunsafeint64) | 669.22µs |
680.5µs | 11.3µs | 1.7% |
|
[ArrayViewGetIntUnsafeInt64CheckNull](#arrayviewgetintunsafeint64checknull)
| 1.03ms | 1.21ms | 178.7µs | 17.4% |
| [ArrayViewGetIntUnsafeInt8](#arrayviewgetintunsafeint8) | 948.13µs |
946.34µs | 1ns | -0.2% |
| [SchemaInitWideStruct](#schemainitwidestruct) | 1.04ms | 1.02ms | 1ns
| -2.1% |
| [SchemaViewInitWideStruct](#schemaviewinitwidestruct) | 106.08µs |
104.56µs | 1ns | -1.4% |
## ArrowArrayView-related benchmarks
Benchmarks for consuming ArrowArrays using the ArrowArrayViewXXX()
functions.
### ArrayViewGetIntUnsafeInt8
Use ArrowArrayViewGetIntUnsafe() to consume an int8 array.
[View
Source](https://github.com/paleolimbot/arrow-nanoarrow/blob/c-more-benchmarks/dev/benchmarks/c/array_benchmark.cc#L108-L110)
| preset_name | iterations | real_time | cpu_time | items_per_second |
|:------------|-----------:|----------:|---------:|-----------------:|
| local | 746 | 946µs | 945µs | 1,058,678,610 |
| v0.4.0 | 745 | 948µs | 947µs | 1,056,345,018 |
### ArrayViewGetIntUnsafeInt16
Use ArrowArrayViewGetIntUnsafe() to consume an int16 array.
[View
Source](https://github.com/paleolimbot/arrow-nanoarrow/blob/c-more-benchmarks/dev/benchmarks/c/array_benchmark.cc#L113-L115)
| preset_name | iterations | real_time | cpu_time | items_per_second |
|:------------|-----------:|----------:|---------:|-----------------:|
| local | 1115 | 631µs | 630µs | 1,586,161,276 |
| v0.4.0 | 1110 | 635µs | 634µs | 1,576,482,853 |
### ArrayViewGetIntUnsafeInt32
Use ArrowArrayViewGetIntUnsafe() to consume an int32 array.
[View
Source](https://github.com/paleolimbot/arrow-nanoarrow/blob/c-more-benchmarks/dev/benchmarks/c/array_benchmark.cc#L118-L120)
| preset_name | iterations | real_time | cpu_time | items_per_second |
|:------------|-----------:|----------:|---------:|-----------------:|
| local | 1106 | 637µs | 636µs | 1,572,865,930 |
| v0.4.0 | 1116 | 636µs | 635µs | 1,574,396,587 |
### ArrayViewGetIntUnsafeInt64
Use ArrowArrayViewGetIntUnsafe() to consume an int64 array.
[View
Source](https://github.com/paleolimbot/arrow-nanoarrow/blob/c-more-benchmarks/dev/benchmarks/c/array_benchmark.cc#L123-L125)
| preset_name | iterations | real_time | cpu_time | items_per_second |
|:------------|-----------:|----------:|---------:|-----------------:|
| local | 1036 | 680µs | 680µs | 1,471,241,907 |
| v0.4.0 | 1039 | 669µs | 668µs | 1,496,471,266 |
### ArrayViewGetIntUnsafeInt64CheckNull
Use ArrowArrayViewGetIntUnsafe() to consume an int64 array (checking for
nulls)
[View
Source](https://github.com/paleolimbot/arrow-nanoarrow/blob/c-more-benchmarks/dev/benchmarks/c/array_benchmark.cc#L128-L130)
| preset_name | iterations | real_time | cpu_time | items_per_second |
|:------------|-----------:|----------:|---------:|-----------------:|
| local | 581 | 1.21ms | 1.2ms | 830,641,968 |
| v0.4.0 | 697 | 1.03ms | 1.02ms | 976,185,007 |
## Schema-related benchmarks
Benchmarks for producing and consuming ArrowSchema.
### SchemaInitWideStruct
Benchmark ArrowSchema creation for very wide tables.
Simulates part of the process of creating a very wide table with a
simple column type (integer).
[View
Source](https://github.com/paleolimbot/arrow-nanoarrow/blob/c-more-benchmarks/dev/benchmarks/c/schema_benchmark.cc#L45-L56)
| preset_name | iterations | real_time | cpu_time | items_per_second |
|:------------|-----------:|----------:|---------:|-----------------:|
| local | 684 | 1.02ms | 1.02ms | 9,788,166 |
| v0.4.0 | 686 | 1.04ms | 1.04ms | 9,606,888 |
### SchemaViewInitWideStruct
Benchmark ArrowSchema parsing for very wide tables.
Simulates part of the process of consuming a very wide table. Typically
the ArrowSchemaViewInit() is done by ArrowArrayViewInit() but uses a
similar pattern.
[View
Source](https://github.com/paleolimbot/arrow-nanoarrow/blob/c-more-benchmarks/dev/benchmarks/c/schema_benchmark.cc#L78-L91)
| preset_name | iterations | real_time | cpu_time | items_per_second |
|:------------|-----------:|----------:|---------:|-----------------:|
| local | 6753 | 105µs | 104µs | 95,812,784 |
| v0.4.0 | 6762 | 106µs | 106µs | 94,630,337 |
</details>
---------
Co-authored-by: Jacob Wujciak-Jens <[email protected]>
---
.github/workflows/benchmarks.yaml | 20 +-
CMakeLists.txt | 15 +-
.../CMakeLists.txt => dev/benchmarks/.gitignore | 14 +-
dev/benchmarks/CMakeLists.txt | 82 +++++
dev/benchmarks/CMakePresets.json | 40 ++
dev/benchmarks/README.md | 51 +++
.../benchmarks/apidoc/.gitignore | 13 +-
dev/benchmarks/apidoc/Doxyfile | 407 +++++++++++++++++++++
dev/benchmarks/benchmark-report.qmd | 228 ++++++++++++
dev/benchmarks/benchmark-run-all.sh | 68 ++++
dev/benchmarks/benchmarks.Rproj | 16 +
.../benchmarks/c}/array_benchmark.cc | 5 +-
.../benchmarks/c}/schema_benchmark.cc | 2 +-
dev/release/rat_exclude_files.txt | 2 +-
14 files changed, 910 insertions(+), 53 deletions(-)
diff --git a/.github/workflows/benchmarks.yaml
b/.github/workflows/benchmarks.yaml
index 3ebc8832..1072d2a1 100644
--- a/.github/workflows/benchmarks.yaml
+++ b/.github/workflows/benchmarks.yaml
@@ -25,9 +25,11 @@ on:
branches:
- main
paths:
- - 'CMakeLists.txt'
- '.github/workflows/benchmarks.yaml'
- - 'src/**/*_benchmark.cc'
+ - 'dev/benchmarks/**'
+
+permissions:
+ contents: read
jobs:
benchmarks:
@@ -36,17 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v4
-
- - name: Build nanoarrow
- run: |
- mkdir build && cd build
- cmake .. -DNANOARROW_BUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=Release
- cmake --build .
-
- name: Run benchmarks
run: |
- cd build
- for f in $(ls | grep -e "_benchmark"); do
- echo "::group::$(basename ${f})"
- ./${f}
- done
+ cd dev/benchmarks
+ ./benchmark-run-all.sh
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d45a57cd..8714c709 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,7 @@ cmake_minimum_required(VERSION 3.14)
if(NOT DEFINED CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
+ set(CMAKE_C_STANDARD_REQUIRED ON)
endif()
set(NANOARROW_VERSION "0.5.0-SNAPSHOT")
@@ -260,17 +261,5 @@ if(NANOARROW_BUILD_TESTS)
endif()
if(NANOARROW_BUILD_BENCHMARKS)
- # benchmark requires at least C++11
- if(NOT DEFINED CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 11)
- endif()
-
- add_subdirectory("thirdparty/benchmark")
-
- add_executable(schema_benchmark src/nanoarrow/schema_benchmark.cc)
- add_executable(array_benchmark src/nanoarrow/array_benchmark.cc)
-
- target_link_libraries(schema_benchmark PRIVATE nanoarrow
benchmark::benchmark_main)
- target_link_libraries(array_benchmark PRIVATE nanoarrow
benchmark::benchmark_main)
-
+ add_subdirectory(dev/benchmarks)
endif()
diff --git a/thirdparty/benchmark/CMakeLists.txt b/dev/benchmarks/.gitignore
similarity index 66%
copy from thirdparty/benchmark/CMakeLists.txt
copy to dev/benchmarks/.gitignore
index ae52bf90..c06fbb3f 100644
--- a/thirdparty/benchmark/CMakeLists.txt
+++ b/dev/benchmarks/.gitignore
@@ -6,7 +6,7 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
@@ -15,13 +15,5 @@
# specific language governing permissions and limitations
# under the License.
-include(FetchContent)
-
-set(BENCHMARK_ENABLE_TESTING OFF)
-
-fetchcontent_declare(benchmark
- URL
https://github.com/google/benchmark/archive/refs/tags/v1.8.3.zip
- URL_HASH
SHA256=abfc22e33e3594d0edf8eaddaf4d84a2ffc491ad74b6a7edc6e7a608f690e691
-)
-
-fetchcontent_makeavailable(benchmark)
+.Rhistory
+benchmark-report.md
diff --git a/dev/benchmarks/CMakeLists.txt b/dev/benchmarks/CMakeLists.txt
new file mode 100644
index 00000000..0d628aec
--- /dev/null
+++ b/dev/benchmarks/CMakeLists.txt
@@ -0,0 +1,82 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+message(STATUS "Building using CMake version: ${CMAKE_VERSION}")
+cmake_minimum_required(VERSION 3.14)
+include(FetchContent)
+
+project(nanoarrow_benchmarks)
+
+if(NOT DEFINED CMAKE_C_STANDARD)
+ set(CMAKE_C_STANDARD 99)
+ set(CMAKE_C_STANDARD_REQUIRED ON)
+endif()
+
+if(NOT DEFINED CMAKE_CXX_STANDARD)
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+endif()
+
+set(NANOARROW_BENCHMARK_VERSION
+ ""
+ CACHE STRING "nanoarrow version to benchmark")
+set(NANOARROW_BENCHMARK_SOURCE_DIR
+ ""
+ CACHE STRING "path to a nanoarrow source checkout to benchmark" OFF)
+
+# Avoids a warning about timestamps on downloaded files (prefer new policy
+# if available))
+if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.23")
+ cmake_policy(SET CMP0135 NEW)
+endif()
+
+# Use google/benchmark
+set(BENCHMARK_ENABLE_TESTING OFF)
+fetchcontent_declare(benchmark
+ URL
https://github.com/google/benchmark/archive/refs/tags/v1.8.3.zip
+ URL_HASH
SHA256=abfc22e33e3594d0edf8eaddaf4d84a2ffc491ad74b6a7edc6e7a608f690e691
+)
+fetchcontent_makeavailable(benchmark)
+
+if(IS_DIRECTORY "${NANOARROW_BENCHMARK_SOURCE_URL}")
+ fetchcontent_declare(nanoarrow SOURCE_DIR
"${NANOARROW_BENCHMARK_SOURCE_URL}")
+ fetchcontent_makeavailable(nanoarrow)
+elseif(NOT NANOARROW_BENCHMARK_SOURCE_URL STREQUAL "")
+ fetchcontent_declare(nanoarrow URL "${NANOARROW_BENCHMARK_SOURCE_URL}")
+ fetchcontent_makeavailable(nanoarrow)
+endif()
+
+# Check that either the parent scope or this CMakeLists.txt defines a
nanoarrow target
+if(NOT TARGET nanoarrow)
+ message(FATAL_ERROR "nanoarrow target not found (missing
-DNANOARROW_BENCHMARK_SOURCE_URL option?)"
+ )
+endif()
+
+# Add + link tests
+add_executable(schema_benchmark c/schema_benchmark.cc)
+add_executable(array_benchmark c/array_benchmark.cc)
+
+target_link_libraries(schema_benchmark PRIVATE nanoarrow
benchmark::benchmark_main)
+target_link_libraries(array_benchmark PRIVATE nanoarrow
benchmark::benchmark_main)
+
+# This lets all benchmarks run via ctest -VV when this is the top-level project
+include(CTest)
+enable_testing()
+add_test(NAME schema_benchmark COMMAND schema_benchmark
+ --benchmark_out=schema_benchmark.json)
+add_test(NAME array_benchmark COMMAND array_benchmark
+ --benchmark_out=array_benchmark.json)
diff --git a/dev/benchmarks/CMakePresets.json b/dev/benchmarks/CMakePresets.json
new file mode 100644
index 00000000..d64be290
--- /dev/null
+++ b/dev/benchmarks/CMakePresets.json
@@ -0,0 +1,40 @@
+{
+ "version": 3,
+ "cmakeMinimumRequired": {
+ "major": 3,
+ "minor": 21,
+ "patch": 0
+ },
+ "configurePresets": [
+ {
+ "name": "base",
+ "hidden": true,
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Release",
+ "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
+ }
+ },
+ {
+ "name": "local",
+ "displayName": "local",
+ "description": "Uses the nanoarrow C sources from this checkout.",
+ "inherits": [
+ "base"
+ ],
+ "cacheVariables": {
+ "NANOARROW_BENCHMARK_SOURCE_URL": "${sourceDir}/../.."
+ }
+ },
+ {
+ "name": "v0.4.0",
+ "displayName": "v0.4.0",
+ "description": "Uses the nanoarrow C sources the 0.4.0 release.",
+ "inherits": [
+ "base"
+ ],
+ "cacheVariables": {
+ "NANOARROW_BENCHMARK_SOURCE_URL":
"https://github.com/apache/arrow-nanoarrow/archive/refs/tags/apache-arrow-nanoarrow-0.4.0.zip"
+ }
+ }
+ ]
+}
diff --git a/dev/benchmarks/README.md b/dev/benchmarks/README.md
new file mode 100644
index 00000000..e6193c13
--- /dev/null
+++ b/dev/benchmarks/README.md
@@ -0,0 +1,51 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Benchmarking nanoarrow
+
+This subdirectory contains benchmarks and tools to run them. This is currently
+only implemented for the C library but may expand to include the R and Python
+bindings. The structure is as follows:
+
+- Benchmarks are documented inline using [Doxygen](https://www.doxygen.nl/).
+- Configurations are CMake build presets, and CMake handles pulling a previous
+ or local nanoarrow using `FetchContent`. Benchmarks are run using `ctest`.
+- There is a bare-bones report written as a [Quarto](https://quarto.org)
+ document that renders to markdown.
+
+You can run benchmarks for a single configuration (e.g., `local`) with:
+
+```shell
+mkdir build && cd build
+cmake .. --preset local
+cmake --build .
+ctest
+```
+
+The provided `benchmark-run-all.sh` creates (or reuses, if they are already
+present) build directories in the form `build/<preset>` for each preset
+and runs `ctest`.
+
+You can build a full report by running:
+
+```shell
+./benchmark-run-all.sh
+cd apidoc && doxygen && cd ..
+quarto render benchmark-report.qmd
+```
diff --git a/thirdparty/benchmark/CMakeLists.txt
b/dev/benchmarks/apidoc/.gitignore
similarity index 66%
rename from thirdparty/benchmark/CMakeLists.txt
rename to dev/benchmarks/apidoc/.gitignore
index ae52bf90..8e6b4909 100644
--- a/thirdparty/benchmark/CMakeLists.txt
+++ b/dev/benchmarks/apidoc/.gitignore
@@ -6,7 +6,7 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
@@ -15,13 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-include(FetchContent)
-
-set(BENCHMARK_ENABLE_TESTING OFF)
-
-fetchcontent_declare(benchmark
- URL
https://github.com/google/benchmark/archive/refs/tags/v1.8.3.zip
- URL_HASH
SHA256=abfc22e33e3594d0edf8eaddaf4d84a2ffc491ad74b6a7edc6e7a608f690e691
-)
-
-fetchcontent_makeavailable(benchmark)
+xml
diff --git a/dev/benchmarks/apidoc/Doxyfile b/dev/benchmarks/apidoc/Doxyfile
new file mode 100644
index 00000000..bfbde9a5
--- /dev/null
+++ b/dev/benchmarks/apidoc/Doxyfile
@@ -0,0 +1,407 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Doxyfile 1.9.4
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = "nanoarrow_benchmarks"
+PROJECT_NUMBER =
+PROJECT_BRIEF =
+PROJECT_LOGO =
+OUTPUT_DIRECTORY =
+CREATE_SUBDIRS = NO
+CREATE_SUBDIRS_LEVEL = 8
+ALLOW_UNICODE_NAMES = NO
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH =
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+JAVADOC_BANNER = NO
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+PYTHON_DOCSTRING = YES
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 4
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+OPTIMIZE_OUTPUT_SLICE = NO
+EXTENSION_MAPPING =
+MARKDOWN_SUPPORT = YES
+TOC_INCLUDE_HEADINGS = 5
+AUTOLINK_SUPPORT = YES
+BUILTIN_STL_SUPPORT = NO
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+GROUP_NESTED_COMPOUNDS = NO
+SUBGROUPING = YES
+INLINE_GROUPED_CLASSES = NO
+INLINE_SIMPLE_STRUCTS = NO
+TYPEDEF_HIDES_STRUCT = NO
+LOOKUP_CACHE_SIZE = 0
+NUM_PROC_THREADS = 1
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_PRIV_VIRTUAL = NO
+EXTRACT_PACKAGE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+RESOLVE_UNNAMED_PARAMS = YES
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = NO
+HIDE_SCOPE_NAMES = NO
+HIDE_COMPOUND_REFERENCE= NO
+SHOW_HEADERFILE = YES
+SHOW_INCLUDE_FILES = YES
+SHOW_GROUPED_MEMB_INC = NO
+FORCE_LOCAL_INCLUDES = NO
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_MEMBERS_CTORS_1ST = NO
+SORT_GROUP_NAMES = NO
+SORT_BY_SCOPE_NAME = NO
+STRICT_PROTO_MATCHING = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_FILES = YES
+SHOW_NAMESPACES = YES
+FILE_VERSION_FILTER =
+LAYOUT_FILE =
+CITE_BIB_FILES =
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_IF_INCOMPLETE_DOC = YES
+WARN_NO_PARAMDOC = NO
+WARN_AS_ERROR = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LINE_FORMAT = "at line $line of file $file"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = ../c \
+ .
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.idl \
+ *.ddl \
+ *.odl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.l \
+ *.cs \
+ *.d \
+ *.php \
+ *.php4 \
+ *.php5 \
+ *.phtml \
+ *.inc \
+ *.m \
+ *.markdown \
+ *.md \
+ *.mm \
+ *.dox \
+ *.py \
+ *.pyw \
+ *.f90 \
+ *.f95 \
+ *.f03 \
+ *.f08 \
+ *.f18 \
+ *.f \
+ *.for \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf \
+ *.ice
+RECURSIVE = NO
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS = *
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+FILTER_SOURCE_PATTERNS =
+USE_MDFILE_AS_MAINPAGE =
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION = NO
+REFERENCES_LINK_SOURCE = YES
+SOURCE_TOOLTIPS = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = YES
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = NO
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_EXTRA_STYLESHEET =
+HTML_EXTRA_FILES =
+HTML_COLORSTYLE_HUE = 220
+HTML_COLORSTYLE_SAT = 100
+HTML_COLORSTYLE_GAMMA = 80
+HTML_TIMESTAMP = NO
+HTML_DYNAMIC_MENUS = YES
+HTML_DYNAMIC_SECTIONS = NO
+HTML_INDEX_NUM_ENTRIES = 100
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_FEEDURL =
+DOCSET_BUNDLE_ID = org.doxygen.Project
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+DOCSET_PUBLISHER_NAME = Publisher
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+GENERATE_QHP = NO
+QCH_FILE =
+QHP_NAMESPACE = org.doxygen.Project
+QHP_VIRTUAL_FOLDER = doc
+QHP_CUST_FILTER_NAME =
+QHP_CUST_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
+QHG_LOCATION =
+GENERATE_ECLIPSEHELP = NO
+ECLIPSE_DOC_ID = org.doxygen.Project
+DISABLE_INDEX = NO
+GENERATE_TREEVIEW = NO
+FULL_SIDEBAR = NO
+ENUM_VALUES_PER_LINE = 4
+TREEVIEW_WIDTH = 250
+EXT_LINKS_IN_WINDOW = NO
+OBFUSCATE_EMAILS = YES
+HTML_FORMULA_FORMAT = png
+FORMULA_FONTSIZE = 10
+FORMULA_TRANSPARENT = YES
+FORMULA_MACROFILE =
+USE_MATHJAX = NO
+MATHJAX_VERSION = MathJax_2
+MATHJAX_FORMAT = HTML-CSS
+MATHJAX_RELPATH =
+MATHJAX_EXTENSIONS =
+MATHJAX_CODEFILE =
+SEARCHENGINE = YES
+SERVER_BASED_SEARCH = NO
+EXTERNAL_SEARCH = NO
+SEARCHENGINE_URL =
+SEARCHDATA_FILE = searchdata.xml
+EXTERNAL_SEARCH_ID =
+EXTRA_SEARCH_MAPPINGS =
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME =
+MAKEINDEX_CMD_NAME = makeindex
+LATEX_MAKEINDEX_CMD = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4
+EXTRA_PACKAGES =
+LATEX_HEADER =
+LATEX_FOOTER =
+LATEX_EXTRA_STYLESHEET =
+LATEX_EXTRA_FILES =
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = YES
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+LATEX_BIB_STYLE = plain
+LATEX_TIMESTAMP = NO
+LATEX_EMOJI_DIRECTORY =
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_SUBDIR =
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = YES
+XML_OUTPUT = xml
+XML_PROGRAMLISTING = YES
+XML_NS_MEMB_FILE_SCOPE = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+GENERATE_DOCBOOK = NO
+DOCBOOK_OUTPUT = docbook
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+EXTERNAL_PAGES = YES
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+DIA_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+DOT_NUM_THREADS = 0
+DOT_FONTNAME = Helvetica
+DOT_FONTSIZE = 10
+DOT_FONTPATH =
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+UML_LIMIT_NUM_FIELDS = 10
+DOT_UML_DETAILS = NO
+DOT_WRAP_THRESHOLD = 17
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DIR_GRAPH_MAX_DEPTH = 1
+DOT_IMAGE_FORMAT = png
+INTERACTIVE_SVG = NO
+DOT_PATH =
+DOTFILE_DIRS =
+MSCFILE_DIRS =
+DIAFILE_DIRS =
+PLANTUML_JAR_PATH =
+PLANTUML_CFG_FILE =
+PLANTUML_INCLUDE_PATH =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 0
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
diff --git a/dev/benchmarks/benchmark-report.qmd
b/dev/benchmarks/benchmark-report.qmd
new file mode 100644
index 00000000..23fd8edc
--- /dev/null
+++ b/dev/benchmarks/benchmark-report.qmd
@@ -0,0 +1,228 @@
+---
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+title: "Benchmark Report"
+format: gfm
+---
+
+```{r setup, include=FALSE}
+library(tidyverse)
+library(xml2)
+library(bench)
+
+# For linking benchmark sources with
https://github.com/{repo}/blob/{ref}/file#Lxx
+# This heuristic is not perfect but will generally result in correct links
+# for PRs that update benchmarks and the general running of benchmarks on the
+# main branch.
+github_repo <- "apache/arrow-nanoarrow"
+github_ref <- gert::git_branch()
+if (github_ref != "main") {
+ try({
+ remote <- gert::git_remote_info()
+ github_repo <- str_match(remote$url, "github.com/([^/]+/[^/.]+)")[,2]
+ })
+}
+
+knitr::opts_chunk$set(echo = FALSE, results = "hide")
+```
+
+```{r}
+# Read the presets from CMakePresets.json. This is the canonical list of
+# supported benchmark configurations.
+presets <- jsonlite::read_json("CMakePresets.json", simplifyVector =
TRUE)$configurePresets |>
+ filter(is.na(hidden)) |>
+ rename_all(~paste0("preset_", .))
+```
+
+```{r}
+benchmark_data <- tibble(
+ src = list.files("build", "_benchmark\\.json$", recursive = TRUE, full.names
= TRUE),
+ content = map(src, jsonlite::read_json, simplifyVector = TRUE)
+) |>
+ unnest_wider(content) |>
+ select(-context) |>
+ unnest_longer(benchmarks) |>
+ unnest_wider(benchmarks) |>
+ extract(src, "preset_name", "build/([^/]+)/") |>
+ # Use bench::bench_time vctr class to help with unit printing
+ mutate(
+ real_time_pretty = as_bench_time(paste0(real_time, time_unit)),
+ cpu_time_pretty = as_bench_time(paste0(cpu_time, time_unit)),
+ benchmark_label = str_remove(name, "^Benchmark")
+ )
+```
+
+```{r}
+groups <- tibble(
+ group_files = list.files(
+ "apidoc/xml",
+ "^group__.*?\\.xml$",
+ recursive = TRUE,
+ full.names = TRUE
+ ),
+ group_xml = map(group_files, ~xml_find_first(read_xml(.), "compounddef")),
+ group_id = group_xml |>
+ map(xml_find_first, "compoundname") |>
+ map_chr(xml_text),
+ group_title = group_xml |>
+ map(xml_find_first, "title") |>
+ map_chr(xml_text),
+ group_description = group_xml |>
+ map(xml_find_all, "detaileddescription/para") |>
+ map(xml_text) |>
+ map_chr(paste, collapse = "\n\n"),
+ function_xml = group_xml |>
+ map(xml_find_all, "//memberdef")
+)
+
+functions <- groups |>
+ select(group_id, function_xml) |>
+ mutate(function_xml = map(function_xml, map, identity)) |>
+ unnest_longer(function_xml) |>
+ mutate(
+ function_name = function_xml |>
+ map(xml_find_first, "name") |>
+ map_chr(xml_text),
+ function_brief = function_xml |>
+ map(xml_find_all, "briefdescription/para") |>
+ map(xml_text) |>
+ map_chr(paste, collapse = "\n\n"),
+ function_description = function_xml |>
+ map(xml_find_all, "detaileddescription/para") |>
+ map(xml_text) |>
+ map_chr(paste, collapse = "\n\n"),
+ function_file = function_xml |>
+ map(xml_find_first, "location") |>
+ map_chr(xml_attr, "file") |>
+ str_replace(".*?/dev/benchmarks", "dev/benchmarks"),
+ function_line_start = function_xml |>
+ map(xml_find_first, "location") |>
+ map_chr(xml_attr, "bodystart") |>
+ as.integer(),
+ function_line_end = function_xml |>
+ map(xml_find_first, "location") |>
+ map_chr(xml_attr, "bodyend") |>
+ as.integer(),
+ benchmark_label = str_remove(function_name, "^Benchmark")
+ )
+```
+
+## Configurations
+
+These benchmarks were run with the following configurations:
+
+```{r}
+#| results: markup
+
+presets |>
+ transmute(
+ preset_name,
+ preset_description
+ ) |>
+ knitr::kable()
+```
+
+## Summary
+
+A quick and dirty summary of benchmark results between this checkout and the
last released version.
+
+```{r}
+#| results: markup
+
+preset_contender <- presets$preset_name[1]
+preset_baseline <- presets$preset_name[2]
+
+benchmark_data |>
+ arrange(benchmark_label) |>
+ filter(preset_name %in% c(preset_baseline, preset_contender)) |>
+ transmute(
+ preset_name = factor(preset_name, levels = c(preset_baseline,
preset_contender)),
+ benchmark_label = as_factor(benchmark_label),
+ real_time = real_time_pretty
+ ) |>
+ arrange(preset_name) |>
+ pivot_wider(names_from = preset_name, values_from = real_time) |>
+ mutate(
+ benchmark_label =
glue::glue("[{benchmark_label}](#{tolower(benchmark_label)})"),
+ change = (.data[[preset_contender]] - .data[[preset_baseline]]),
+ pct_change = paste0(
+ round(
+ as.numeric(change) / as.numeric(.data[[preset_baseline]]) * 100,
+ 1
+ ),
+ "%"
+ )
+ ) |>
+ select(everything(), pct_change, change) |>
+ knitr::kable(align = "lrrrr")
+```
+
+```{r}
+#| results: asis
+
+template_group <- "
+
+## {group_title}
+
+{group_description}
+
+{functions}
+"
+
+template_func <- "
+
+### {benchmark_label}
+
+{function_brief}
+
+{function_description}
+
+[View
Source](https://github.com/{github_repo}/blob/{github_ref}/{function_file}#L{function_line_start}-L{function_line_end})
+
+{function_table}
+"
+
+make_table <- function(benchmark_name) {
+ benchmark_data |>
+ filter(name == benchmark_name) |>
+ transmute(
+ preset_name,
+ iterations,
+ real_time = real_time_pretty,
+ cpu_time = cpu_time_pretty,
+ items_per_second = format(items_per_second, big.mark = ",")
+ ) |>
+ knitr::kable(align = "lrrrr") |>
+ as.character() |>
+ paste(collapse = "\n")
+}
+
+functions |>
+ semi_join(benchmark_data, by = c("function_name" = "name")) |>
+ mutate(
+ function_table = map_chr(function_name, make_table),
+ content = glue::glue(template_func)
+ ) |>
+ group_by(group_id) |>
+ summarise(functions = paste(content, collapse = "\n\n")) |>
+ left_join(groups, by = "group_id") |>
+ mutate(groups = glue::glue(template_group)) |>
+ pull(groups) |>
+ paste(collapse = "\n\n") |>
+ cat()
+```
diff --git a/dev/benchmarks/benchmark-run-all.sh
b/dev/benchmarks/benchmark-run-all.sh
new file mode 100755
index 00000000..836d96ea
--- /dev/null
+++ b/dev/benchmarks/benchmark-run-all.sh
@@ -0,0 +1,68 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -e
+set -o pipefail
+
+if [ ${VERBOSE:-0} -gt 0 ]; then
+ set -x
+fi
+
+benchmarks_source_dir="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
+build_dir="$1"
+
+if [ -z "${CMAKE_BIN}" ]; then
+ CMAKE_BIN=cmake
+fi
+
+# Default build directory is build/ relative to this script
+if [ -z "${build_dir}" ]; then
+ build_dir="${benchmarks_source_dir}/build"
+fi
+
+if [ ! -d "${build_dir}" ]; then
+ mkdir -p "${build_dir}"
+fi
+
+# List the build presets. Build presets are the canonical source for
+# nanoarrow configurations supported by these benchmarks.
+presets=$("${CMAKE_BIN}" --list-presets | grep -e " - " | sed -e "s/^.* //")
+
+# Configure/build all of them (lazily)
+pushd "${build_dir}"
+for preset in ${presets}; do
+ echo "::group::Build ${preset} benchmarks"
+ if [ ! -d ${preset} ]; then
+ mkdir ${preset}
+ fi
+
+ pushd ${preset}
+ cmake -S "${benchmarks_source_dir}" --preset ${preset}
+ cmake --build .
+ popd
+done
+
+# Run the benchmarks. This will generate a *_benchmark.json for each
+# benchmark that was run.
+for preset in ${presets}; do
+ echo "::group::Run ${preset} benchmarks"
+ pushd ${preset}
+ ctest -VV
+ popd
+done
+popd
diff --git a/dev/benchmarks/benchmarks.Rproj b/dev/benchmarks/benchmarks.Rproj
new file mode 100644
index 00000000..e83436a3
--- /dev/null
+++ b/dev/benchmarks/benchmarks.Rproj
@@ -0,0 +1,16 @@
+Version: 1.0
+
+RestoreWorkspace: Default
+SaveWorkspace: Default
+AlwaysSaveHistory: Default
+
+EnableCodeIndexing: Yes
+UseSpacesForTab: Yes
+NumSpacesForTab: 2
+Encoding: UTF-8
+
+RnwWeave: Sweave
+LaTeX: pdfLaTeX
+
+AutoAppendNewline: Yes
+StripTrailingWhitespace: Yes
diff --git a/src/nanoarrow/array_benchmark.cc
b/dev/benchmarks/c/array_benchmark.cc
similarity index 96%
rename from src/nanoarrow/array_benchmark.cc
rename to dev/benchmarks/c/array_benchmark.cc
index 93c4f7a0..33d9b26b 100644
--- a/src/nanoarrow/array_benchmark.cc
+++ b/dev/benchmarks/c/array_benchmark.cc
@@ -17,7 +17,7 @@
#include <benchmark/benchmark.h>
-#include "nanoarrow.hpp"
+#include <nanoarrow/nanoarrow.hpp>
/// \defgroup nanoarrow-benchmark-array-view ArrowArrayView-related benchmarks
///
@@ -34,7 +34,8 @@ ArrowErrorCode InitSchemaAndArrayPrimitive(ArrowSchema*
schema, ArrowArray* arra
NANOARROW_RETURN_NOT_OK(ArrowArrayInitFromSchema(array, schema, nullptr));
// Set the data buffer
- nanoarrow::BufferInitSequence(ArrowArrayBuffer(array, 1), std::move(values));
+ NANOARROW_RETURN_NOT_OK(ArrowBufferAppend(ArrowArrayBuffer(array, 1),
values.data(),
+ values.size() * sizeof(CType)));
// Pack the validity bitmap
if (validity.size() > 0) {
diff --git a/src/nanoarrow/schema_benchmark.cc
b/dev/benchmarks/c/schema_benchmark.cc
similarity index 98%
rename from src/nanoarrow/schema_benchmark.cc
rename to dev/benchmarks/c/schema_benchmark.cc
index 2e6b330e..e888fd8c 100644
--- a/src/nanoarrow/schema_benchmark.cc
+++ b/dev/benchmarks/c/schema_benchmark.cc
@@ -17,7 +17,7 @@
#include <benchmark/benchmark.h>
-#include "nanoarrow.hpp"
+#include <nanoarrow/nanoarrow.hpp>
/// \defgroup nanoarrow-benchmark-schema Schema-related benchmarks
///
diff --git a/dev/release/rat_exclude_files.txt
b/dev/release/rat_exclude_files.txt
index 3402b5ae..4bec8dec 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -6,7 +6,7 @@ rat.txt
r/DESCRIPTION
r/NAMESPACE
r/.Rbuildignore
-r/nanoarrow.Rproj
+*.Rproj
*.Rd
r/tests/testthat/_snaps/*.md
r/cran-comments.md