Author Topic: Anything Good Happen Today?  (Read 855906 times)

0 Members and 7 Guests are viewing this topic.

Offline RavynousHunter

  • Master Thief
  • The Beast
  • *****
  • Posts: 8108
  • Gender: Male
  • A man of no consequence.
    • My Twitter
Re: Anything Good Happen Today?
« Reply #4140 on: August 09, 2016, 10:46:01 am »
Not so much good as it is curious...

I'm taking my first foray into LINQ and PLINQ (think SQL for code...more or less), and I found that my little program that rolls a bunch of dice and filters results vs. a target value (roll >= target) takes longer when the filtering is done in parallel (PLINQ) than when done sequentially (regular LINQ).  I've tried just about every permutation of the code of which I can think, and the results are all the same: dice rolling works best in parallel, but the filtering works best sequentially.  Maybe if I try using the LINQ methods instead of keywords, I'll get different results, but still, this is most odd...most odd, indeed.

[ETA]

Nope, even using the methods, its still slower.  The hell?
« Last Edit: August 09, 2016, 10:49:17 am by RavynousHunter »
Quote from: Bra'tac
Life for the sake of life means nothing.

Offline The_Queen

  • Royalty & Royalty-free
  • The Beast
  • *****
  • Posts: 1840
  • Gender: Female
  • And here we go...
Re: Anything Good Happen Today?
« Reply #4141 on: August 09, 2016, 02:21:01 pm »
Not so much good as it is curious...

I'm taking my first foray into LINQ and PLINQ (think SQL for code...more or less), and I found that my little program that rolls a bunch of dice and filters results vs. a target value (roll >= target) takes longer when the filtering is done in parallel (PLINQ) than when done sequentially (regular LINQ).  I've tried just about every permutation of the code of which I can think, and the results are all the same: dice rolling works best in parallel, but the filtering works best sequentially.  Maybe if I try using the LINQ methods instead of keywords, I'll get different results, but still, this is most odd...most odd, indeed.

[ETA]

Nope, even using the methods, its still slower.  The hell?

Have you tried hitting it? That usually makes it work.
Does anyone take Donald Trump seriously, anymore?

Offline RavynousHunter

  • Master Thief
  • The Beast
  • *****
  • Posts: 8108
  • Gender: Male
  • A man of no consequence.
    • My Twitter
Re: Anything Good Happen Today?
« Reply #4142 on: August 17, 2016, 01:58:59 pm »
Found out something interesting, yesterday: three ways to force methods to execute in separate threads without having to wrap them up inside a Thread object (which can be cumbersome and I'm not 100% sure if it works with methods that have non-void return types and/or arguments).  Parallel.Invoke() forces lambdas and anonymous delegates into separate threads from the main thread, according to my small experiments, but not methods outside the calling method.  For that, you've got to wrap your method up in a Func<TArg, ReturnType> and call it that way.  This should be quite handy should I want to force certain methods to execute in parallel with the main thread while not having to bother wrapping it up in an explicit Thread object.
Quote from: Bra'tac
Life for the sake of life means nothing.

Offline niam2023

  • The Beast
  • *****
  • Posts: 4213
  • Gender: Male
  • The Forum Chad
Re: Anything Good Happen Today?
« Reply #4143 on: August 17, 2016, 02:28:42 pm »
I discovered I can incline bench my body weight +6 pounds. For reference, I way 179 pounds right now and incline is a more difficult exercise than standard bench.
Living Life, Lifting, Waiting for Summer

Offline The_Queen

  • Royalty & Royalty-free
  • The Beast
  • *****
  • Posts: 1840
  • Gender: Female
  • And here we go...
Re: Anything Good Happen Today?
« Reply #4144 on: August 21, 2016, 02:50:26 am »
I caught a shiny Graveler, just randomly in the wild in pokemon Crystal.
Does anyone take Donald Trump seriously, anymore?

Art Vandelay

  • Guest
Re: Anything Good Happen Today?
« Reply #4145 on: August 21, 2016, 03:04:19 am »
I hope you're part of that tiny minority that would ever be able to evolve it.

Offline Veras

  • The Beast
  • *****
  • Posts: 1097
  • Gender: Male
  • I aim to misbehave
Re: Anything Good Happen Today?
« Reply #4146 on: August 21, 2016, 08:40:09 pm »
It wasn't today, but I've been too busy to post about it until today:

I'm now a father!  My son was born at 6:15 PM on Thursday, August 18, 2016.  The labor was rough and it ultimately ended in a c-section, so it will take some time for my wife to recover, but we got what we wanted:  healthy mommy, healthy baby.

It's weird, I never wanted kids, but I had to run some errands today and it only took me being away for maybe 20 minutes before I started missing him, so apparently I was wrong about that.
RIP Tony Benn (1925 - 2014)

"There is no moral difference between a stealth bomber and a suicide bomber. Both kill innocent people for political reasons."

“If we can find the money to kill people, we can find the money to help people.”

"I'm not frightened about death. I don't know why, but I just feel that at a certain moment your switch is switched off, and that's it. And you can't do anything about it."

Offline Askold

  • Definitely not hiding a dark secret.
  • Global Moderator
  • The Beast
  • *****
  • Posts: 8358
  • Gender: Male
Re: Anything Good Happen Today?
« Reply #4147 on: August 21, 2016, 11:51:25 pm »
Congratulations!
No matter what happens, no matter what my last words may end up being, I want everyone to claim that they were:
"If you strike me down, I shall become more powerful than you could possibly imagine."
Aww, you guys rock. :)  I feel the love... and the pitchforks and torches.  Tingly!

Offline rookie

  • Miscreant, petty criminal, and all around nice guy
  • The Beast
  • *****
  • Posts: 2200
  • Gender: Male
Re: Anything Good Happen Today?
« Reply #4148 on: August 22, 2016, 11:21:21 am »
Congratulations! Just know when to say when lol.
The difference between 0 and 1 is infinite. The difference between 1 and a million is a matter of degree. - Zack Johnson

Quote from: davedan board=pg thread=6573 post=218058 time=1286247542
I'll stop eating beef lamb and pork the same day they start letting me eat vegetarians.

Offline davedan

  • Lord Cracker
  • The Beast
  • *****
  • Posts: 3539
Re: Anything Good Happen Today?
« Reply #4149 on: August 22, 2016, 05:23:37 pm »
Congratulations. Welcome to the club.

Offline ironbite

  • Overlord of all that is good in Iacon City
  • Kakarot
  • ******
  • Posts: 10686
  • Gender: Male
  • Stuck in the middle with you.
Re: Anything Good Happen Today?
« Reply #4150 on: August 22, 2016, 06:03:47 pm »
Speaking of new life....I GOT A NEW COMPUTER!

Ironbite-A PC!  EEEEEEEEEEEEEEEEEEEEEEEEEEEE!

Offline RavynousHunter

  • Master Thief
  • The Beast
  • *****
  • Posts: 8108
  • Gender: Male
  • A man of no consequence.
    • My Twitter
Re: Anything Good Happen Today?
« Reply #4151 on: August 22, 2016, 09:52:18 pm »
Speaking of new life....I GOT A NEW COMPUTER!

Ironbite-A PC!  EEEEEEEEEEEEEEEEEEEEEEEEEEEE!

Welcome to the Cool Kids Club!
Quote from: Bra'tac
Life for the sake of life means nothing.

Offline Zygarde

  • Black trans queen of FQA
  • The Beast
  • *****
  • Posts: 2784
  • Fuck trees, I climb clouds, motherfucker!'
    • My YouTube Channel
Re: Anything Good Happen Today?
« Reply #4152 on: August 23, 2016, 12:48:16 am »
21 years ago a person was born, this made a lot of people angry and is generally regarded by many people as a bad move, so yeah I turned 21 today happy me!

Offline Random Gal

  • Bisex Rex
  • The Beast
  • *****
  • Posts: 2686
  • Gender: Female
  • Sic Semper Tyrannosaurus
Re: Anything Good Happen Today?
« Reply #4153 on: August 23, 2016, 01:02:42 am »
Hi everyone! I'm back!

I was gone for a week or so due to having other things on my plate. As you may recall from a thread I posted on the subject, I lost my job as a field paleontologist in California after two clients I was brought on to do consulting work for backed out of their projects and left me with no work.

Anyway, I could no longer afford rent in California without the job, so my parents ended up having to bail me out of that positions and cosigned with me on a small studio apartment back in Arizona where I'd been living before. So anyway, I'm back on my feet for the moment. My last apartment complex was nice enough that they'll be returning most of my $2490 deposit soon and I still have around $350 to my name before that after rent and bills are paid for August. I'm back to doing volunteer work on fossils at the local museum while interviewing for various different jobs at this point.

Anyway, I only just got my internet connected at my apartment today, so I thought I'd stop in and say hi.

And congratulations to Veras of course :)

Offline Søren

  • Russian Lush
  • The Beast
  • *****
  • Posts: 2484
  • Ни шагу назад
Re: Anything Good Happen Today?
« Reply #4154 on: August 31, 2016, 03:35:56 am »
Looks like I might be finally moving out.
Faisons lever l'étoile du mérite passé.  Le monde a besoin de lumière,  Le monde a besoin de la France,  La France a besoin de tous les Français.