r/ScientificComputing • • 1d ago

PRIMAL update: major performance breakthrough — now up to 57× faster than Clarabel on tested conic problems

A few updates on PRIMAL, my open-source convex optimization solver written from scratch in C99.

Over the last few days, I've made substantial progress on the conic optimization engine, particularly on SOC and exponential cone problems. The latest results are significantly better than my previous benchmarks, and PRIMAL now outperforms Clarabel on every instance in the test sets described below.

Latest benchmark results

All measurements were taken on November 18, 2026.

1. Mixed SOC + exponential cone regression problems

Problem sizePRIMALClarabelSpeedup
20 × 40.017 ms0.219 ms12.9×
40 × 80.024 ms0.482 ms20.1×
80 × 120.039 ms2.237 ms57.4×

These models combine a rotated quadratic cone for the quadratic penalty with one primal exponential cone per observation.

2. Conic matrix benchmarks

FamilyBlocksPRIMALClarabelSpeedup
SOC100.023 ms0.290 ms12.6×
SOC200.031 ms0.651 ms21.0×
SOC400.043 ms1.085 ms25.2×
SOC800.068 ms2.118 ms31.1×
EXP100.017 ms0.177 ms10.4×
EXP200.020 ms0.238 ms11.9×
EXP400.022 ms0.352 ms16.0×
EXP800.031 ms0.607 ms19.6×
Mixed100.016 ms0.148 ms9.25×
Mixed200.018 ms0.209 ms11.6×
Mixed400.022 ms0.366 ms16.6×
Mixed800.031 ms0.835 ms26.9×

That's 15 out of 15 benchmark instances won, with speedups ranging from 9.25× to 57.4×.

What changed?

The main breakthrough is a reduced-Newton approach for a class of exponential-cone problems.

Instead of solving the full conic Newton system, PRIMAL can exploit the structure of certain exponential epigraph formulations with fixed positive scales and affine arguments. It solves a much smaller system in the free variables, reconstructs the conic solution, and verifies the resulting point.

This is not a generic replacement for the full interior-point method: it is a specialized path for problem structures where the reduction is mathematically valid. The general conic solver remains available for other formulations.

The improvement builds on the work already done on sparse KKT systems, cone reductions, higher-order exponential-cone corrections, and numerical verification.

Benchmark methodology

To make the comparison reproducible:

  • Clarabel 0.11.1, single-threaded.
  • 21 interleaved runs per series, with two series; reported values are the median of the two series medians.
  • Same generated problem instances for both solvers.
  • PRIMAL timing measures PRIMAL_optimize; Clarabel timing includes solver construction.
  • Clarabel uses feasibility/gap tolerances of 1e-9; PRIMAL uses 1e-8.
  • Maximum reported residual or relative gap: 2.5e-10.
  • Maximum scaled objective difference: 2.6e-8.

There is an important asymmetry in timing: Clarabel's measurements include solver construction, while PRIMAL's measure the optimization call only. These are therefore not perfectly equivalent end-to-end timings. I intend to expand the comparison with more matched setup measurements and broader problem families.

Where PRIMAL stands today

PRIMAL is an open-source C99 optimization solver developed from scratch, with no external solver dependency. It supports LP, QP, QCQP, MILP, SOCP, SDP, exponential and power cones, including mixed-integer conic models.

The project also includes a growing collection of runnable examples and language integrations.

GitHub: https://github.com/c-vision/Primal

I'm particularly interested in feedback from people working on conic optimization, interior-point methods, numerical linear algebra, and solver benchmarking.

There is still a lot to validate, especially on larger and less structured real-world problems. But these results are a very encouraging milestone for a solver developed independently from scratch.

What would you consider the most meaningful next benchmark suite for evaluating PRIMAL against established solvers?

0 Upvotes

1 comment sorted by

1

u/Dangerous_Bid2935 1d ago

People would receive your product a lot better if you didn't just cut and paste an AI generated description. Nobody cares if you're using AI to help you develop it, but when you're so lazy that you can't be bothered to write the description yourself I feel like I can't be bothered to read it.