Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?

Comment: Re:Check their work or check the summary? (Score 1) 486

by jfbilodeau (#49338957) Attached to: No, It's Not Always Quicker To Do Things In Memory
OMG C is SOOOooOO slow compared to my l33t Java code! In the spirit of the fine paper related to this article, here's a 100% fair, unbiased comparison of both languages.
[code lang="c"]
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>

int main(int argc, char** argv) {
    const char* appendString = "1";

    char* concatString = (char*)malloc(1);
    concatString[0] = 0;

    int numIter = 100000;

    clock_t startTime, endTime;

    startTime = clock();

    for (int i = 0; i < numIter; i++) {
        char* tempString = (char*)malloc(strlen(concatString) + strlen(appendString) + 1);
        strcpy(tempString, concatString);
        strcat(tempString, appendString);
        concatString = tempString;

    endTime = clock();

    double totalTime = (double)(endTime - startTime) / CLOCKS_PER_SEC;
    printf("Operation took %f seconds", totalTime);
    return EXIT_SUCCESS;

[code lang="java"]
public class Crap {
    public static void main(String[] args) {
        String appendString = "1";
        String concatString = "";

        int numIter = 100000;

        long startTime, endTime;

        startTime = System.currentTimeMillis();

        StringBuilder builder = new StringBuilder();

        for (int i = 0; i < numIter; i++) {

        concatString = builder.toString();
        endTime = System.currentTimeMillis();
        double totalTime = (double)(endTime - startTime) / 1000;

        System.out.printf("Operation took %f seconds\n", totalTime);


[code lang="term"]
$ cc -O3 crap.c -o crap
$ ./crap
Operation took 0.749926 seconds
$ javac
$ java Crap
Operation took 0,009000 seconds

Look how FATSTER JAVA is compared to C!!!!1!! You should be ashamed of using such a sloow programming language like C!

Comment: Re:Like everything else M$... (Score 1) 208

by jfbilodeau (#49173111) Attached to: What Would Minecraft 2 Look Like Under Microsoft?

Minecraft isn't all that good of a game

You seem to be confusing "I don't like that game" with "it's not a good game". I suspect that more copies of Minecraft were sold than Neverhood, Age of Empires series , Starlancer/Freelancer series, Midtown Madness series, Mechwarrior 4 and Flight Simulator combined.

Human beings were created by water to transport it uphill.