Recent

Author Topic: Offical launch of the 1 Billion Row Challenge in Object Pascal  (Read 26347 times)

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #15 on: March 19, 2024, 03:48:01 pm »
Hey Thaddy,

You can also set the roundmode directly in fpc. I don't think that matters but there is a speed gain. There is also a speed gain using the LLVM back-end with linker optimization. And the others - the compiled languages - do that too.....
What means we are not testing the language, but the compiler..... Another reason to think twice.
And don't forget to inline and {$I-}. I expect yet another 10-15% gain with LLVM.

I understand most of what you said, but some of it is lost on me due to lack of context.
Are you talking about the Delphi entries and `PAServer`?

Cheers,
Gus

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #16 on: March 19, 2024, 04:22:17 pm »
Hey bytebites,

Math.Ceil gives same result than complicated PascalRound, at least sha256sum is same.

After having a look at what Math.Ceil returns, I noticed that it returns an Integer.
There's still some jiggling to be done to get a single decimal digit after the decimal point.

Can kindly I ask you how you've done that?

Cheers,
Gus

bytebites

  • Hero Member
  • *****
  • Posts: 777
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #17 on: March 19, 2024, 05:22:53 pm »
This print average temperature
Code: Pascal  [Select][+][-]
  1. formatfloat('0.0',ceil((temp_sum div 10) / temp_cnt))

temp_sum = temperature is multiplied by ten and summed up hence div 10.

this gives hash ebad17b266ee9f5cb3d118531f197e6f68c9ab988abc5cb9506e6257e1a52ce6

This hash was for input file so input file is correct.  :-[

Please provide hash for result too.
« Last Edit: March 19, 2024, 06:33:40 pm by bytebites »

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #18 on: March 19, 2024, 09:05:47 pm »
Hey bytebites,

This print average temperature
Code: Pascal  [Select][+][-]
  1. formatfloat('0.0',ceil((temp_sum div 10) / temp_cnt))

temp_sum = temperature is multiplied by ten and summed up hence div 10.


That's quite nice :D
I'll give it a go and then report back.

this gives hash ebad17b266ee9f5cb3d118531f197e6f68c9ab988abc5cb9506e6257e1a52ce6

This hash was for input file so input file is correct.  :-[

Please provide hash for result too.

Yes, I'm sorry I didn't provide the hash for the output on the README. Because we haven't done the baseline for Delphi, we only have results for the Free Pascal side.

At the moment, the still to be officiated hash is: db3d79d31b50daa8c03a1e4f2025029cb137f9971aa04129d8bca004795ae524

If this is reproducible on the Delphi side of the fence, it will then become the official hash for the output.

Cheers,
Gus

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #19 on: March 19, 2024, 10:06:12 pm »
Hey bytebites,

This print average temperature
Code: Pascal  [Select][+][-]
  1. formatfloat('0.0',ceil((temp_sum div 10) / temp_cnt))

I wasn't paying attention, but after having a better look at it, I don't think that works as intended.

You see Ceil returns an Integer. Being an Integer it will not have a decimal part.
This fails the entire premise that it can then be displayed as a one decimal place real number, right?

Is it missing a real number division by 10 somewhere( maybe outside Ceil ) and not the integer number div?

Or am I having a senior moment and not seeing something quite obvious? :D

Cheers,
Gus

bytebites

  • Hero Member
  • *****
  • Posts: 777
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #20 on: March 19, 2024, 10:43:56 pm »
It is wrong result. Let remove last six messages.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #21 on: March 19, 2024, 11:28:17 pm »
Hey bytebites,

It is wrong result. Let remove last six messages.

LOL!! :D

No problem mate, we all do it now and again!!

Cheers,
Gus

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #22 on: March 20, 2024, 10:52:40 pm »
Hey Y'All,

Okies, since the repository is the de facto central place for all things related to the challenge, I've opened the Discussion tab on it.

Cheers,
Gus

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #23 on: March 21, 2024, 11:30:56 am »
Hey Y'All,

We are officially in the 16 to 17 seconds:

Code: Text  [Select][+][-]
  1. $ time ./bin/sbalazs /tmp/measurements-1_000_000_000.txt 32
  2. {...}
  3. real 0m16.422s
  4. user 3m46.669s
  5. sys 1m29.654s

Only 15 to 16 seconds to go  :D

Cheers,
Gus

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #24 on: March 22, 2024, 08:15:10 am »
Hey Y'All,

Added a section named Differences From Original to the README.md file to frame the context when doing comparison with the original challenge.

Cheer,
Gus

Hartmut

  • Hero Member
  • *****
  • Posts: 1072
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #25 on: March 22, 2024, 12:12:00 pm »
I read the chapter "Differences From Original" but I don't understand what you mean. What means "I've decided that I would want this challenge to be turned way up to 11". Even with google translator I don't understand this. Do you want to change our rules retroactively?

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #26 on: March 22, 2024, 01:34:25 pm »
Hey Hartmut,

I read the chapter "Differences From Original" but I don't understand what you mean. What means "I've decided that I would want this challenge to be turned way up to 11". Even with google translator I don't understand this. Do you want to change our rules retroactively?

Getting something up to 11 is an English saying based on an old movie: Up to eleven.

What I meant with this is that we are not using the max of 400 weather stations on the input file. I'm not quite sure how many we are using, cuz I haven't tallied them up, but we are using the random generator on all ~44k from the data/weather_stations.csv, so I'm guessing that we have a ton more than 400 in there.

Then there's the fact that the original challenge is only using 8 threads, where I'm allowing the use of all 16 cores, 32 threads on my machine.

This makes it not quite an Apples to Apples comparison, so I had to add that section to make it clear.

Hope this clears it out !!

Cheers,
Gus

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #27 on: March 22, 2024, 01:38:24 pm »
Hey Y'All,

We are now into the 2 seconds region:
Code: Text  [Select][+][-]
  1. ******** Run All ********
  2.  
  3. ===== Arnaud Bouchez ======
  4. -- SSD --
  5. Benchmark 1: abouchez
  6.   Time (mean ± σ):      2.472 s ±  0.061 s    [User: 27.787 s, System: 1.720 s]
  7.   Range (min … max):    2.386 s …  2.588 s    10 runs
  8.  
  9. ===========

That's 1 warmup, 10 runs, 16 threads on SSD

I'm having issues with Linux watchdogs with 2 entries when run on HDD killing my shell.
Need to solve that and I'll have results for those.

Thanks @synapse !!

Cheers,
Gus

Hartmut

  • Hero Member
  • *****
  • Posts: 1072
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #28 on: March 22, 2024, 02:32:11 pm »
Hey Hartmut,

I read the chapter "Differences From Original" but I don't understand what you mean. What means "I've decided that I would want this challenge to be turned way up to 11". Even with google translator I don't understand this. Do you want to change our rules retroactively?

Getting something up to 11 is an English saying based on an old movie: Up to eleven.

Thank you Gus for clarification. Now I understand.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Offical launch of the 1 Billion Row Challenge in Object Pascal
« Reply #29 on: March 22, 2024, 03:22:55 pm »
Hey Hartmut,

Thank you Gus for clarification. Now I understand.

More than welcome !!

Cheers,
Gus

 

TinyPortal © 2005-2018