diff --git a/src/Web/Challenges/ChallengesController.php b/src/Web/Challenges/ChallengesController.php new file mode 100644 index 0000000..ebd31dc --- /dev/null +++ b/src/Web/Challenges/ChallengesController.php @@ -0,0 +1,23 @@ + 'text/html; charset=utf-8', + ], + ); + } +} diff --git a/src/Web/Challenges/parsing-100m-lines.html b/src/Web/Challenges/parsing-100m-lines.html new file mode 100644 index 0000000..4671ea9 --- /dev/null +++ b/src/Web/Challenges/parsing-100m-lines.html @@ -0,0 +1,1605 @@ + + + + + + 100 Million Row Challenge | Tempest PHP + + + + + + + + + + + +
+ Loading... +
+ + + +
+ + +
+
100 Million Row Challenge
+

Parsing 100M rows
with pure PHP

+

+ Parse a dataset of 100 million page visits from CSV into a sorted JSON file. + Fork the repo, implement Parser::parse(), and submit a PR. + How fast can you go? +

+

+ Sponsored by JetBrains PhpStorm & Tideways +

+
+ + +
+

Current Standings

+

Top 3 multithread performers based on the latest benchmark run. Positions may change until the challenge ends. Single-thread has a separate prize.

+
+
+
+ + +
+

The Race

+

Performance improvements over time for the top contenders.

+
+
+ +
+
+
+
+
+
+ + +
+
+

Leaderboard

+ Live +
+

All submissions ranked by execution time.

+
+
+ + +
+ + +
+
+
+ + + + + + + + + + +
Rank Participant Time Submitted
+
+
+
+ + +
+

About the Challenge

+

Rules, prizes, and server specifications.

+
+
+
+ How It Works + +
+
+

Parse a dataset of 100 million page visits from CSV into a sorted JSON file using pure PHP. Each entry maps a URL path to daily visit counts, sorted by date ascending.

+

Fork the repo, implement Parser::parse(), and submit a PR. Results are benchmarked on a dedicated Mac Mini M1 with 12GB RAM.

+
+
+
+
+ Prizes + +
+
+
+
+
1st Place
+
    +
  • PhpStorm Elephpant
  • +
  • Tideways Elephpant
  • +
  • JetBrains All Products (1yr)
  • +
  • AI Ultimate (3mo)
  • +
  • Tideways Team (1yr)
  • +
+
+
+
2nd Place
+
    +
  • PhpStorm Elephpant
  • +
  • Tideways Elephpant
  • +
  • JetBrains All Products (1yr)
  • +
  • AI Ultimate (3mo)
  • +
+
+
+
3rd Place
+
    +
  • PhpStorm Elephpant
  • +
  • Tideways Elephpant
  • +
  • JetBrains All Products (1yr)
  • +
+
+
+
Single-thread
+
    +
  • PhpStorm Elephpant
  • +
  • JetBrains All Products (1yr)
  • +
+
+
+
Random draw
+
    +
  • PhpStorm Elephpant
  • +
  • JetBrains All Products (1yr)
  • +
+
+
+
+
+
+
+ Rules + +
+
+

Solutions must be written in PHP only. No FFI, no external tools, no internet access. Your script may only work within the project directory.

+

The solution must validate against the real dataset. Improvements of 0.01s or more are counted. Ties are broken by submission time.

+
+
+
+
+ Server Specs + +
+
+

Mac Mini M1 with 12GB available RAM. JIT is disabled. OPcache is disabled.

+

Each submission is run individually on the dedicated server to prevent bias. Results are manually verified before benchmarking.

+
+
+
+
+ +
+ + + + + + diff --git a/src/Web/Community/CommunityPostType.php b/src/Web/Community/CommunityPostType.php index 2e1e5b7..0efe224 100644 --- a/src/Web/Community/CommunityPostType.php +++ b/src/Web/Community/CommunityPostType.php @@ -9,6 +9,7 @@ enum CommunityPostType: string case BLOG = 'Blog'; case VIDEO = 'Video'; case PACKAGE = 'Package'; + case CHALLENGE = 'Challenge'; public function getStyle(): string { @@ -16,6 +17,7 @@ public function getStyle(): string self::BLOG => 'bg-yellow-400/20 dark:bg-yellow-400/10 text-yellow-700 dark:text-yellow-400', self::VIDEO => 'bg-blue-400/20 dark:bg-blue-400/10 text-blue-700 dark:text-blue-400', self::PACKAGE => 'bg-teal-400/20 dark:bg-teal-400/10 text-teal-700 dark:text-teal-400', + self::CHALLENGE => 'bg-purple-400/20 dark:bg-purple-400/10 text-purple-700 dark:text-purple-400', }; } } diff --git a/src/Web/Community/community-posts.yaml b/src/Web/Community/community-posts.yaml index f7f313b..fb5ea66 100644 --- a/src/Web/Community/community-posts.yaml +++ b/src/Web/Community/community-posts.yaml @@ -1,3 +1,7 @@ +- uri: /challenges/parsing-100m-lines + title: "Parsing 100 Million Lines" + description: A performance challenge to parse 100 million rows as fast as possible + type: Challenge - uri: https://starle.sh/tempest-the-journey-thus-far title: "Tempest: The Journey Thus Far" description: One user's first steps with Tempest