~/talk

Extending CRuby with native Graph data type

Talkat MountainWest RubyConf 2013 · 2013-04-03..04-05· [ruby, databases]
slides:none on file

Adds a native Graph type to CRuby by writing a C extension (ext/adjacency_list_graph.c) that exposes a Graph class via the usual allocation and init hooks, uses the data_Wrap_Struct / data_get_struct helpers, and implements BFS, Dijkstra and MST in C. Handles GC with mark and free callbacks and a temporary trace array when converting C results to Ruby arrays. Benchmarks show dramatic gains — 65k nodes: 10 ms vs 1 min (~100×) — and scales to million‑node graphs where C finishes in hours while Ruby takes orders of magnitude longer.

AI-written summary · about

  1. 0:00Introduction
  2. 4:05Array class
  3. 10:40Array method
  4. 12:02Array structure
  5. 12:26Basic object
  6. 12:59Error object
  7. 13:38Array
  8. 15:07Memory Allocation
  9. 16:00Arrays
  10. 16:55Widget
  11. 18:03initialization
  12. 18:59widgetstruct
  13. 20:08ext folder
  14. 21:52C file
  15. 22:42allocation
  16. 23:21free
  17. 23:48highlevel function
  18. 24:57garbage collection
  19. 26:16why
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.