Click here to Skip to main content
12,545,720 members (59,016 online)

Code Lean and Mean

This competition has ended

In days of yore it was a badge of honour to be able to fit a full file manager, spreadsheet application, appointment reminder and Tetris Easter Egg within a 32KB executable.

Kids these days are hard pressed to get "Hello, World" in under 4MB so we're going to wind back the clock.

The Challenge

Create an application that will calculate and display the changes between two text files as fast as possible using the least amount of memory possible. Provide timing data and maximum memory use data to prove you're the leanest and meanest.

There will be 3 categories:

  1. C/C++
  2. .NET (any language)
  3. Any other language

Once you have created your application and posted it as an article, post a link in the forum below so we can all view and comment on it.


  1. You can wrap your solution in a GUI if you wish, and there's no need to report memory usage or speed of the framework you use to support your code.
  2. The format of the files is unimportant. Treat them as plain text.
  3. Some runtimes such as .NET have a large working set already. You only need to report the maximum amount of memory your code uses above and beyond the base working set needed by the underlying runtime. If. while calling runtime methods, member is allocated then if possible this will have to be taken into account.

Test Data

All applications will use the same data. This file contains two large HTML files that have a small number of changes.

The competition ends Midnight August 31, 2009.

The prize


Fame, adulation and a Code Project T-shirt.

Conditions of Entry | Current winners list

GeneralSmart TextDiff Utility for Intel© 64 Platform Pin
Arthur V. Ratz30-Apr-16 3:43
professionalArthur V. Ratz30-Apr-16 3:43 
GeneralDeltaScope updated Pin
Christopher Erker2-Sep-09 10:54
memberChristopher Erker2-Sep-09 10:54 
General[Contest Entry] Pin
Sean Ewington1-Sep-09 10:30
staffSean Ewington1-Sep-09 10:30 
GeneralRe: [Contest Entry] Pin
Christopher Erker1-Sep-09 11:06
memberChristopher Erker1-Sep-09 11:06 
General...and a C# version for me too Pin
Eric Haddan31-Aug-09 16:15
memberEric Haddan31-Aug-09 16:15 
General[Contest Entry] Pin
Nick Butler31-Aug-09 9:23
mentorNick Butler31-Aug-09 9:23 
General[Contest Entry] Pin
Nick Butler31-Aug-09 2:47
mentorNick Butler31-Aug-09 2:47 
GeneralAnother C++ entry Pin
Alain Rist29-Aug-09 22:26
memberAlain Rist29-Aug-09 22:26 
GeneralAnother C++ entry updated Pin
Alain Rist31-Aug-09 10:44
memberAlain Rist31-Aug-09 10:44 
GeneralMy C++ Entry Pin
Eric Haddan29-Aug-09 15:05
memberEric Haddan29-Aug-09 15:05 
GeneralMy entry (PIEBALDdiff) [modified] Pin
PIEBALDconsult28-Aug-09 15:21
memberPIEBALDconsult28-Aug-09 15:21 
GeneralRe: My entry (PIEBALDdiff) Pin
Luc Pattyn28-Aug-09 15:44
mvpLuc Pattyn28-Aug-09 15:44 
GeneralRe: My entry (PIEBALDdiff) Pin
PIEBALDconsult29-Aug-09 5:29
memberPIEBALDconsult29-Aug-09 5:29 
GeneralNew entry Pin
Luc Pattyn27-Aug-09 5:27
mvpLuc Pattyn27-Aug-09 5:27 
GeneralNew version of old entry Pin
Luc Pattyn31-Aug-09 15:58
mvpLuc Pattyn31-Aug-09 15:58 
GeneralRe: New entry Pin
Michael Scott Smith1-Sep-09 3:55
memberMichael Scott Smith1-Sep-09 3:55 
GeneralRe: New entry Pin
Luc Pattyn1-Sep-09 4:06
mvpLuc Pattyn1-Sep-09 4:06 
GeneralRe: New entry Pin
Michael Scott Smith1-Sep-09 11:59
memberMichael Scott Smith1-Sep-09 11:59 
GeneralRe: New entry Pin
Michael Scott Smith1-Sep-09 12:08
memberMichael Scott Smith1-Sep-09 12:08 
General[Contest Entry] Pin
Nick Butler27-Aug-09 3:48
mentorNick Butler27-Aug-09 3:48 
NewsRe: [Contest Entry] Updated Pin
Nick Butler28-Aug-09 7:37
mentorNick Butler28-Aug-09 7:37 
GeneralSubmitted article for this contest. Pin
Gaurav Dudeja India26-Aug-09 23:51
memberGaurav Dudeja India26-Aug-09 23:51 
AnswerThe O(ND) diff algorithm is on CodeProject since 2006 [modified] Pin
Matthias Hertel24-Aug-09 10:35
memberMatthias Hertel24-Aug-09 10:35 
At An O(ND) Difference Algorithm for C#[^]
you can find an implementation of Eugene Myers famous algorithm that I implemented in C# back in 2005 and put it on codeproject in 2006.
It is proved to find a smallest set of changes.

There are some more samples and an updated version around the core implementation available at[^]

The original implementation had a huge memory consumtion and so I optimized a lot by re-using the already allocated memory structures.
The core algorithm also only works with numeric values and not with text strings so the core algorithm is quiet efficient with memory.

modified on Monday, August 24, 2009 4:56 PM

General[Contest Entry] Code Lean and Mean File DIFF (FIFF) Application [modified] Pin
Ilka Guigova23-Aug-09 15:50
memberIlka Guigova23-Aug-09 15:50 
GeneralNo problem. What's the coding job pay? Pin
Edwin Smith21-Aug-09 13:00
memberEdwin Smith21-Aug-09 13:00 
General[Contest entry] An LCS based diff-ing library in C# Pin
Nishant Sivakumar20-Aug-09 19:29
sitebuilderNishant Sivakumar20-Aug-09 19:29 
GeneralA line-by-line solution in C# Pin
psouza4micronet20-Aug-09 10:28
memberpsouza4micronet20-Aug-09 10:28 
GeneralRe: A line-by-line solution in C# Pin
Peter Souza26-Aug-09 6:49
memberPeter Souza26-Aug-09 6:49 
GeneralRe: A line-by-line solution in C# Pin
Chris Maunder26-Aug-09 11:18
adminChris Maunder26-Aug-09 11:18 
GeneralRe: A line-by-line solution in C# Pin
Peter Souza26-Aug-09 11:21
memberPeter Souza26-Aug-09 11:21 
GeneralMyEntry Pin
darkoman20-Aug-09 6:10
memberdarkoman20-Aug-09 6:10 
GeneralMy Entry for Lean & Mean Pin
Wasiq Amjad Bhamla15-Aug-09 10:53
memberWasiq Amjad Bhamla15-Aug-09 10:53 
GeneralMuch more challenging Pin
BillHudson14-Aug-09 8:36
memberBillHudson14-Aug-09 8:36 
GeneralSome references Pin
Rosenne14-Aug-09 6:08
memberRosenne14-Aug-09 6:08 
GeneralMy Entry Pin
Matthew Hazlett12-Aug-09 17:03
memberMatthew Hazlett12-Aug-09 17:03 
GeneralRe: My Entry Pin
Matthew Hazlett12-Aug-09 21:11
memberMatthew Hazlett12-Aug-09 21:11 
GeneralRe: My Entry [modified] Pin
Matthew Hazlett13-Aug-09 11:42
memberMatthew Hazlett13-Aug-09 11:42 
GeneralRe: My Entry Pin
Member 393164920-Aug-09 1:55
memberMember 393164920-Aug-09 1:55 
GeneralRestrictions on multiple entries Pin
Daniel Vaughan12-Aug-09 7:27
memberDaniel Vaughan12-Aug-09 7:27 
GeneralRe: Restrictions on multiple entries Pin
Chris Maunder12-Aug-09 8:33
adminChris Maunder12-Aug-09 8:33 
GeneralRe: Restrictions on multiple entries Pin
Luc Pattyn27-Aug-09 11:22
mvpLuc Pattyn27-Aug-09 11:22 
GeneralRe: Restrictions on multiple entries Pin
Chris Maunder27-Aug-09 12:09
adminChris Maunder27-Aug-09 12:09 
GeneralRe: Restrictions on multiple entries; also bug report Pin
Luc Pattyn27-Aug-09 12:20
mvpLuc Pattyn27-Aug-09 12:20 
QuestionCondition of entry - has not been previously published Pin
Rosenne12-Aug-09 6:18
memberRosenne12-Aug-09 6:18 
AnswerRe: Condition of entry - has not been previously published Pin
Chris Maunder12-Aug-09 6:56
adminChris Maunder12-Aug-09 6:56 
GeneralHow generic should the solution be ? Pin
Moreno Airoldi12-Aug-09 3:22
memberMoreno Airoldi12-Aug-09 3:22 
GeneralRe: How generic should the solution be ? Pin
Chris Maunder12-Aug-09 3:33
adminChris Maunder12-Aug-09 3:33 
GeneralRe: How generic should the solution be ? Pin
Moreno Airoldi12-Aug-09 6:57
memberMoreno Airoldi12-Aug-09 6:57 
JokeNew competition Pin
Adriaan Davel11-Aug-09 19:30
memberAdriaan Davel11-Aug-09 19:30 
GeneralAge limit, or not? Pin
GMorris11-Aug-09 6:12
memberGMorris11-Aug-09 6:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web02 | 2.8.161018.1 | Last Updated 10 Aug 2009
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid