• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 11:44
CEST 17:44
KST 00:44
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists16[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0
Community News
2026 GSL Season 1 Qualifiers13Maestros of the Game 2 announced82026 GSL Tour plans announced14Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid24
StarCraft 2
General
Maestros of the Game 2 announced Team Liquid Map Contest #22 - The Finalists MaNa leaves Team Liquid 2026 GSL Tour plans announced Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament 2026 GSL Season 1 Qualifiers GSL CK: More events planned pending crowdfunding RSL Revival: Season 5 - Qualifiers and Main Event Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 522 Flip My Base The PondCast: SC2 News & Results Mutation # 521 Memorable Boss Mutation # 520 Moving Fees
Brood War
General
ASL21 General Discussion Any progamer "explanation" videos like this one? Data needed BGH Auto Balance -> http://bghmmr.eu/ ASL21 Strategy, Pimpest Plays Discussions
Tourneys
[ASL21] Ro16 Group D [Megathread] Daily Proleagues [ASL21] Ro16 Group C [ASL21] Ro16 Group B
Strategy
Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Dawn of War IV Starcraft Tabletop Miniature Game General RTS Discussion Thread Battle Aces/David Kim RTS Megathread
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story Cricket [SPORT]
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2078 users

The Big Programming Thread - Page 922

Forum Index > General Forum
Post a Reply
Prev 1 920 921 922 923 924 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
phar
Profile Joined August 2011
United States1080 Posts
November 29 2017 06:25 GMT
#18421
On November 29 2017 08:09 Blitzkrieg0 wrote:
Show nested quote +
On November 29 2017 08:05 Excludos wrote:
On November 29 2017 07:26 Blitzkrieg0 wrote:
On November 29 2017 07:15 Excludos wrote:
You can't expect someone to know of every possible scenario they might come across. And if you can't test for that, all you can really test for is a super easy fizzbuzz function, which tells you exactly nothing about a person beyond "He does indeed know what a for loop is".


You keep harping on this, but that is exactly what we're testing for. What percentage of candidates do you think we interview that can not write fizzbuzz? We do this for our interns and our entry/newgrad level positions.


Exactly what kind of education do you guys have? In Norway computer science is an engineering degree on the same line as electrical engineer, biochemistry or machine engineers. It requires semi decent grades and quite a bit of math, physics, a bit of chemistry, and a few other general subjects. A for-loop is literally what you learn at first week, and you finish the third year by spending the last 6 months programming a fully functioning program and a full thesis to go along with it. I would have suspected that most of the world operates like this? If so there is simply no way you don't know how to do extremely basic things like a loop after graduating.


I thought the same thing until I interviewed people who couldn't write fizzbuzz with cs degrees.


Yea anyone telling you fizz buzz style questions aren't necessary has not done enough interviews, or is at a tiny company that can be very picky about who they interview (or is unaware of a pipeline in front of them that is filtering for people who can't do fizz buzz).
Who after all is today speaking about the destruction of the Armenians?
Acrofales
Profile Joined August 2010
Spain18274 Posts
November 29 2017 06:42 GMT
#18422
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2017-11-29 09:01:18
November 29 2017 08:54 GMT
#18423
On November 29 2017 15:25 phar wrote:
Show nested quote +
On November 29 2017 08:09 Blitzkrieg0 wrote:
On November 29 2017 08:05 Excludos wrote:
On November 29 2017 07:26 Blitzkrieg0 wrote:
On November 29 2017 07:15 Excludos wrote:
You can't expect someone to know of every possible scenario they might come across. And if you can't test for that, all you can really test for is a super easy fizzbuzz function, which tells you exactly nothing about a person beyond "He does indeed know what a for loop is".


You keep harping on this, but that is exactly what we're testing for. What percentage of candidates do you think we interview that can not write fizzbuzz? We do this for our interns and our entry/newgrad level positions.


Exactly what kind of education do you guys have? In Norway computer science is an engineering degree on the same line as electrical engineer, biochemistry or machine engineers. It requires semi decent grades and quite a bit of math, physics, a bit of chemistry, and a few other general subjects. A for-loop is literally what you learn at first week, and you finish the third year by spending the last 6 months programming a fully functioning program and a full thesis to go along with it. I would have suspected that most of the world operates like this? If so there is simply no way you don't know how to do extremely basic things like a loop after graduating.


I thought the same thing until I interviewed people who couldn't write fizzbuzz with cs degrees.


Yea anyone telling you fizz buzz style questions aren't necessary has not done enough interviews, or is at a tiny company that can be very picky about who they interview (or is unaware of a pipeline in front of them that is filtering for people who can't do fizz buzz).


Thats not necessarily true. Different companies have different recruiting schemes.
For example in my company most people are either recommended by present employees or found by headhunters. Then HR vet them for their experience, salary expectation and etc. And only after that they have interview with technical staff. We dont ask fizzbuzz questions at any point.
Even for junior positions.
For junior testers You get some (simple) program and requirements are told to find as many bugs as possible.
For junior developers there are some simple tasks/questions depending on the technology but no fizzbuzz.
And besides tasks there is always a converastion. Every candidate gets hhis chance.
And we are by no means small company. Granted they might do things differently in other locations, but thats how it is done in our polish location.

I do get what You are saying, there are tech companies in my town that do things this way. They invite a hell lot of people throw fizzbuzz/lanaguage standarized tests at them and invite selct few with best results to interview. You can do things this way. But it is not the only way.
Pathetic Greta hater.
Acrofales
Profile Joined August 2010
Spain18274 Posts
Last Edited: 2017-11-29 09:00:20
November 29 2017 08:59 GMT
#18424
On November 29 2017 17:54 Silvanel wrote:
Show nested quote +
On November 29 2017 15:25 phar wrote:
On November 29 2017 08:09 Blitzkrieg0 wrote:
On November 29 2017 08:05 Excludos wrote:
On November 29 2017 07:26 Blitzkrieg0 wrote:
On November 29 2017 07:15 Excludos wrote:
You can't expect someone to know of every possible scenario they might come across. And if you can't test for that, all you can really test for is a super easy fizzbuzz function, which tells you exactly nothing about a person beyond "He does indeed know what a for loop is".


You keep harping on this, but that is exactly what we're testing for. What percentage of candidates do you think we interview that can not write fizzbuzz? We do this for our interns and our entry/newgrad level positions.


Exactly what kind of education do you guys have? In Norway computer science is an engineering degree on the same line as electrical engineer, biochemistry or machine engineers. It requires semi decent grades and quite a bit of math, physics, a bit of chemistry, and a few other general subjects. A for-loop is literally what you learn at first week, and you finish the third year by spending the last 6 months programming a fully functioning program and a full thesis to go along with it. I would have suspected that most of the world operates like this? If so there is simply no way you don't know how to do extremely basic things like a loop after graduating.


I thought the same thing until I interviewed people who couldn't write fizzbuzz with cs degrees.


Yea anyone telling you fizz buzz style questions aren't necessary has not done enough interviews, or is at a tiny company that can be very picky about who they interview (or is unaware of a pipeline in front of them that is filtering for people who can't do fizz buzz).


Thats not necessarily true. Different companies have different recruiting schemes.
For example in my company most people are either recommended by present employees or found by headhunters. Then HR vet them for their experience, salary expectation and etc. And only after that they have interview with technical staff. We dont ask fizzbuzz questions at any point.
Even for junior positions.
For junior testers You get some (simple) program and requirements are told to find as many bugs as possible.
For junior developers there are some simple tasks/questions depending on the technology but no fizzbuzz.
And besides tasks there is always a converastion. Every candidate gets hhis chance.
And we are by no means small company. Granted they might do things differently in other locations, but thats how it is done in our polish location.

Fizzbuzz is being used as a catch-all for "simple programming tasks", which you do. In fact, I'd argue that hunting bugs in someone else's deliberately crappy code is worse than programming a fizzbuzz algorithm from scratch. Both in terms of difficulty and in terms of what you can learn from it about the applicant.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
November 29 2017 09:12 GMT
#18425
Well sure You can argue. But You misunderstood me. I didnt say anything about looking at some crappy code. You have static analysis tools, unit tests and reviewers for that. I am talking about finding bugs in a working program, not code.

And regarding fizzbuzz usage, someone above mentiond "for" loop and in contrast to that i want to clarify that we do not consider writing a for loop "simple programming task".
Pathetic Greta hater.
Hanh
Profile Joined June 2016
146 Posts
November 29 2017 09:51 GMT
#18426
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Doing a fast matrix multiplication is mostly about optimizing register/cache usage. The bottleneck isn't the CPU unless you use 'special tactics'.

Khalum
Profile Joined September 2010
Austria831 Posts
November 29 2017 10:26 GMT
#18427
On November 29 2017 07:15 Excludos wrote:
[..]
Another reason why live programming isn't very helpful. Not only does a person need to program, he needs to be able to learn. And that means googling..a lot. On my first job out of college I literally had to learn the entirety of Qt library, a third party SDK [..]


If you used 'literally' correctly you might be the only person on the planet who knows the entirety of Qt by heart.
emperorchampion
Profile Blog Joined December 2008
Canada9496 Posts
Last Edited: 2017-11-29 10:38:58
November 29 2017 10:38 GMT
#18428
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.
TRUEESPORTS || your days as a respected member of team liquid are over
mahrgell
Profile Blog Joined December 2009
Germany3943 Posts
November 29 2017 10:49 GMT
#18429
On November 29 2017 19:38 emperorchampion wrote:
Show nested quote +
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.


They talked about n elements of the matrix. At least the initial post did. Not about n*n elements.
But sure, 10 billion entries blow up your memory.
emperorchampion
Profile Blog Joined December 2008
Canada9496 Posts
Last Edited: 2017-11-29 10:52:24
November 29 2017 10:51 GMT
#18430
On November 29 2017 19:49 mahrgell wrote:
Show nested quote +
On November 29 2017 19:38 emperorchampion wrote:
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.


They talked about n elements of the matrix. At least the initial post did. Not about n*n elements.
But sure, 10 billion entries blow up your memory.


Ah my bad, I thought Travis was talking about 100k x 100k. So yeah, what Acrofales said 1mil is nothing.

edit: run time is 0.021 seconds on my system.
TRUEESPORTS || your days as a respected member of team liquid are over
Excludos
Profile Blog Joined April 2010
Norway8251 Posts
November 29 2017 12:15 GMT
#18431
On November 29 2017 19:26 Khalum wrote:
Show nested quote +
On November 29 2017 07:15 Excludos wrote:
[..]
Another reason why live programming isn't very helpful. Not only does a person need to program, he needs to be able to learn. And that means googling..a lot. On my first job out of college I literally had to learn the entirety of Qt library, a third party SDK [..]


If you used 'literally' correctly you might be the only person on the planet who knows the entirety of Qt by heart.


Hahaha. Touché. No, I, like most others, google everything I need when I need it I guess the correct word here should have been "figuratively".
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-11-29 12:30:56
November 29 2017 12:27 GMT
#18432
On November 29 2017 19:51 emperorchampion wrote:
Show nested quote +
On November 29 2017 19:49 mahrgell wrote:
On November 29 2017 19:38 emperorchampion wrote:
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.


They talked about n elements of the matrix. At least the initial post did. Not about n*n elements.
But sure, 10 billion entries blow up your memory.


Ah my bad, I thought Travis was talking about 100k x 100k. So yeah, what Acrofales said 1mil is nothing.

edit: run time is 0.021 seconds on my system.


my bad guy's, it was late
mahgrell's intuition was right, I meant that it was n*n "elements"


so based on what's been said, I am guessing that a million x million is probably out of the realm of all but a few computers out there, unless you do something like use linked lists to represent your matrix?
emperorchampion
Profile Blog Joined December 2008
Canada9496 Posts
Last Edited: 2017-11-29 12:47:18
November 29 2017 12:44 GMT
#18433
On November 29 2017 21:27 travis wrote:
Show nested quote +
On November 29 2017 19:51 emperorchampion wrote:
On November 29 2017 19:49 mahrgell wrote:
On November 29 2017 19:38 emperorchampion wrote:
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.


They talked about n elements of the matrix. At least the initial post did. Not about n*n elements.
But sure, 10 billion entries blow up your memory.


Ah my bad, I thought Travis was talking about 100k x 100k. So yeah, what Acrofales said 1mil is nothing.

edit: run time is 0.021 seconds on my system.


my bad guy's, it was late
mahgrell's intuition was right, I meant that it was n*n "elements"


so based on what's been said, I am guessing that a million x million is probably out of the realm of all but a few computers out there, unless you do something like use linked lists to represent your matrix?


Anecdotally, I believe there are groups at my school that run ~100 million (100 mil x 100 mil) DOF simulations modeling blood flow around the heart or something at the Swiss computing center (3rd fastest according to top500). But I'm not really sure on the details. I believe you're are getting into super computing territory at around 1 mil.

edit: unless you have 8000 GB of ram lying around...

edit2: I suppose the simulations are sparse, so I'm not sure about a dense matrix. Pretty sure it will be memory limited though, the actual execution time would probably not be excessively long.
TRUEESPORTS || your days as a respected member of team liquid are over
mahrgell
Profile Blog Joined December 2009
Germany3943 Posts
November 29 2017 12:48 GMT
#18434
On November 29 2017 21:27 travis wrote:
Show nested quote +
On November 29 2017 19:51 emperorchampion wrote:
On November 29 2017 19:49 mahrgell wrote:
On November 29 2017 19:38 emperorchampion wrote:
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.


They talked about n elements of the matrix. At least the initial post did. Not about n*n elements.
But sure, 10 billion entries blow up your memory.


Ah my bad, I thought Travis was talking about 100k x 100k. So yeah, what Acrofales said 1mil is nothing.

edit: run time is 0.021 seconds on my system.


my bad guy's, it was late
mahgrell's intuition was right, I meant that it was n*n "elements"


so based on what's been said, I am guessing that a million x million is probably out of the realm of all but a few computers out there, unless you do something like use linked lists to represent your matrix?


On most applications where this would be needed, there are mathematical methods to somehow circumvent the problem.
Usually this entails creating more (and sometimes bigger) sparse matrices.

Like in the stuff I'm currently working on, if you just read it directly there are some multiplications M*v, with M being a dense multimillion*multimillion matrix.
But then you can represent M as a product of about 10 matrices, which are all sparse. So instead of calculating M, you take v and multiply it through those 10 matrices from the right, step by step, every time you want to calculate M*v. So you have 10 matrix-vector multiplications, with all matrices being sparse.

The whole issue becomes a bit more difficult, as there are some inverted matrices in between, which again cant be inverted with traditional means in any reasonable time, and the entire process is spread out over a cluster, but in the end everything is done in a way, that you absolutely never ever have to handle large dense matrices in one place.

And this is a huge field of mathematics/numerics which only cares about finding such solutions for all kinds of tasks.
emperorchampion
Profile Blog Joined December 2008
Canada9496 Posts
Last Edited: 2017-11-29 12:59:12
November 29 2017 12:55 GMT
#18435
On November 29 2017 21:48 mahrgell wrote:
Show nested quote +
On November 29 2017 21:27 travis wrote:
On November 29 2017 19:51 emperorchampion wrote:
On November 29 2017 19:49 mahrgell wrote:
On November 29 2017 19:38 emperorchampion wrote:
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.


They talked about n elements of the matrix. At least the initial post did. Not about n*n elements.
But sure, 10 billion entries blow up your memory.


Ah my bad, I thought Travis was talking about 100k x 100k. So yeah, what Acrofales said 1mil is nothing.

edit: run time is 0.021 seconds on my system.


my bad guy's, it was late
mahgrell's intuition was right, I meant that it was n*n "elements"


so based on what's been said, I am guessing that a million x million is probably out of the realm of all but a few computers out there, unless you do something like use linked lists to represent your matrix?


On most applications where this would be needed, there are mathematical methods to somehow circumvent the problem.
Usually this entails creating more (and sometimes bigger) sparse matrices.

Like in the stuff I'm currently working on, if you just read it directly there are some multiplications M*v, with M being a dense multimillion*multimillion matrix.
But then you can represent M as a product of about 10 matrices, which are all sparse. So instead of calculating M, you take v and multiply it through those 10 matrices from the right, step by step, every time you want to calculate M*v. So you have 10 matrix-vector multiplications, with all matrices being sparse.

The whole issue becomes a bit more difficult, as there are some inverted matrices in between, which again cant be inverted with traditional means in any reasonable time, and the entire process is spread out over a cluster, but in the end everything is done in a way, that you absolutely never ever have to handle large dense matrices in one place.

And this is a huge field of mathematics/numerics which only cares about finding such solutions for all kinds of tasks.


Do you have a nice paper for this mahrgell?

Also, if I understand correctly, naively you would have to do this process n (n = something million) times if you want to square M?
TRUEESPORTS || your days as a respected member of team liquid are over
emperorchampion
Profile Blog Joined December 2008
Canada9496 Posts
November 29 2017 13:02 GMT
#18436
One last thing, if you use single precision, 100 k is feasible on a desktop in a naive manner (memory req is around 40 GB on Matlab).
TRUEESPORTS || your days as a respected member of team liquid are over
mahrgell
Profile Blog Joined December 2009
Germany3943 Posts
November 29 2017 13:32 GMT
#18437
On November 29 2017 21:55 emperorchampion wrote:
Show nested quote +
On November 29 2017 21:48 mahrgell wrote:
On November 29 2017 21:27 travis wrote:
On November 29 2017 19:51 emperorchampion wrote:
On November 29 2017 19:49 mahrgell wrote:
On November 29 2017 19:38 emperorchampion wrote:
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.


They talked about n elements of the matrix. At least the initial post did. Not about n*n elements.
But sure, 10 billion entries blow up your memory.


Ah my bad, I thought Travis was talking about 100k x 100k. So yeah, what Acrofales said 1mil is nothing.

edit: run time is 0.021 seconds on my system.


my bad guy's, it was late
mahgrell's intuition was right, I meant that it was n*n "elements"


so based on what's been said, I am guessing that a million x million is probably out of the realm of all but a few computers out there, unless you do something like use linked lists to represent your matrix?


On most applications where this would be needed, there are mathematical methods to somehow circumvent the problem.
Usually this entails creating more (and sometimes bigger) sparse matrices.

Like in the stuff I'm currently working on, if you just read it directly there are some multiplications M*v, with M being a dense multimillion*multimillion matrix.
But then you can represent M as a product of about 10 matrices, which are all sparse. So instead of calculating M, you take v and multiply it through those 10 matrices from the right, step by step, every time you want to calculate M*v. So you have 10 matrix-vector multiplications, with all matrices being sparse.

The whole issue becomes a bit more difficult, as there are some inverted matrices in between, which again cant be inverted with traditional means in any reasonable time, and the entire process is spread out over a cluster, but in the end everything is done in a way, that you absolutely never ever have to handle large dense matrices in one place.

And this is a huge field of mathematics/numerics which only cares about finding such solutions for all kinds of tasks.


Do you have a nice paper for this mahrgell?

Also, if I understand correctly, naively you would have to do this process n (n = something million) times if you want to square M?


The process I described shouldn't be used to square matrices.

But what would be very similar to what I described was, if you had something like r=M*M*v, that instead you would calculate v1 = Mv, r = M*v. This would massively reduce the number of required operations, even if you do this a fair number of times in your code. But even that would probably blow up in your face, so in a more serious approach, you would try to completely disassemble M and somehow split it up in bits that are easier to handle.

The point was, that in most cases you really are not interested in the result of M*M itself or whatever massive operations you are doing. But instead you are just using this as part of other calculations. So now the task is to find ways, how to do those calculations in ways that you don't have to calculate those massive operations.

And often those pathes are longer, more difficult and require significant work. But in the end they are still faster.


About the paper: I don't have any free links for it, but what I'm working on is a cluster implementation of FETI-DP, for which you can find some free papers. But those papers are all targeted at mathematicians (who can code).
Excludos
Profile Blog Joined April 2010
Norway8251 Posts
Last Edited: 2017-11-29 17:14:43
November 29 2017 17:11 GMT
#18438
On November 29 2017 21:27 travis wrote:
Show nested quote +
On November 29 2017 19:51 emperorchampion wrote:
On November 29 2017 19:49 mahrgell wrote:
On November 29 2017 19:38 emperorchampion wrote:
On November 29 2017 15:42 Acrofales wrote:
100k?

And the only operation is squaring? Couple of seconds at most, probably less if you use the right tools (e.g. Matlab): modern personal computers can do a couple of gflops, or a few billion floating point calculations per second. Memory isn't a problem: squaring you only need a single row and column at a time. But even if you needed to store the entire matrix three times, and the matrix contains doubles, you're still only up to 2.4 mb of memory.

1million is still not a problem. Remember: matrix multiplication is O(n^3) with n row/column length.

Anyway, just run some tests! Generate large matrices with random data and multiply them. You'll quickly see what your computer can handle.


Checked with:

A = rand(n, n);
tic;
A = A * A;
toc

n = 100k takes 74.5 GB (n = 1mil is 7450 GB). As Hanh said, you will need to have some algorithm that minimizes the communication time between the memory levels since likely at that level you'll be having to store on the hard drive (SSD).

FYI I ran n = 10k, took 9.323 seconds on my desktop.


They talked about n elements of the matrix. At least the initial post did. Not about n*n elements.
But sure, 10 billion entries blow up your memory.


Ah my bad, I thought Travis was talking about 100k x 100k. So yeah, what Acrofales said 1mil is nothing.

edit: run time is 0.021 seconds on my system.


my bad guy's, it was late
mahgrell's intuition was right, I meant that it was n*n "elements"


so based on what's been said, I am guessing that a million x million is probably out of the realm of all but a few computers out there, unless you do something like use linked lists to represent your matrix?


I was about to say "100k isn't that bad". But 100k x 100k would indeed take up something like half an hour if you even have enough memory to hold it all (Unsure if Matlab lets you do it without enough memory. It might have some kind of semi-smart solution for cases like these).

1m x 1m on the other hand is pretty much impossible on normal systems indeed. But what exactly are you attempting to do here? Is it possible to compress these numbers in any way?

edit: I don't know what university you're at, but some of them do have supercomputers which might be used for good reasons. Their runtime is somewhat expensive tho, so you'd need a really good one, and not just "I'm kinda curious".
sc-darkness
Profile Joined August 2017
856 Posts
Last Edited: 2017-11-29 19:22:31
November 29 2017 18:35 GMT
#18439
Do you guys fail logic tests and/or programming tests which ask you to write code which you're unlikely to use at work/in real life? For example, I was told to write code for an MxM matrix. It's artificially split into layers. Here's an example:

1 1 1 1
1 2 2 1
1 2 2 1
1 1 1 1

Outer layer starts with one. The deeper you dig the higher the number which is 2 in this case. Matrix can be from 1x1 to 9x9 or 100x100. I can't remember exactly. I had to take matrix input and validate if each layer has the expected number.

Also, if you have 1x1 and 2x2 matrix, then they only have an outer layer.

Overall test had to take 1 hour and 30 minutes. It was split into 3 categories - logic questions, SQL questions (8.6/9.0 here) and 2 programming questions. I just think this matrix stuff alone is so time-consuming that it will fuck up your remaining time anyway. Or, is it just me who is being silly?

Personally, it was very easy for me to understand what this matrix question was about. Programming isn't my weakness overall, but coming up with an algorithm/helper functions to check inner layers proved to be the more difficult task. Do you have any suggestions what to read/do so I can become better at tricky stuff like that?

Edit: Fixed matrix because example was wrong.
Artesimo
Profile Joined February 2015
Germany571 Posts
November 29 2017 19:17 GMT
#18440
On November 29 2017 11:43 Manit0u wrote:
Show nested quote +
On November 29 2017 04:33 sc-darkness wrote:
When you see syntax like that, calling C disgusting is a mild insult. You can write much more readable code in C++ (hint: std::function). Luckily, I never had to have an array of function pointers.


I'd take C over C++ any day. C++ is like the ugliest widespread language out there.



You wanna fight me IRL or what?
Prev 1 920 921 922 923 924 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 8h 17m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
LamboSC2 185
ProTech108
Railgan 49
StarCraft: Brood War
Britney 51796
Calm 5884
Horang2 2158
Jaedong 1990
Mini 419
BeSt 338
ggaemo 310
Soma 304
Hyuk 272
firebathero 271
[ Show more ]
Rush 216
Light 206
actioN 178
Dewaltoss 86
Soulkey 77
Backho 63
Sharp 58
Hyun 58
ToSsGirL 49
sSak 41
Killer 38
Movie 34
soO 29
Hm[arnc] 26
IntoTheRainbow 24
Rock 24
HiyA 22
Sacsri 18
scan(afreeca) 17
GoRush 12
NotJumperer 10
Terrorterran 7
Dota 2
Gorgc6631
qojqva1826
Counter-Strike
olofmeister2232
ScreaM1671
fl0m1452
byalli597
zeus212
edward99
Super Smash Bros
Mew2King112
Other Games
FalleN 2999
singsing1717
hiko719
FrodaN711
B2W.Neo646
Mlord515
Trikslyr139
KnowMe127
QueenE89
ArmadaUGS85
Organizations
Dota 2
PGL Dota 2 - Main Stream14284
Other Games
BasetradeTV205
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• LUISG 30
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis2857
• TFBlade1871
• Jankos1524
Other Games
• WagamamaTV166
• Shiphtur112
Upcoming Events
Replay Cast
8h 17m
The PondCast
18h 17m
KCM Race Survival
18h 17m
WardiTV Map Contest Tou…
19h 17m
Gerald vs herO
Clem vs Cure
ByuN vs Solar
Rogue vs MaxPax
ShoWTimE vs TBD
OSC
23h 17m
CranKy Ducklings
1d 8h
Escore
1d 18h
RSL Revival
2 days
Replay Cast
2 days
WardiTV Map Contest Tou…
2 days
[ Show More ]
Universe Titan Cup
2 days
Rogue vs Percival
Ladder Legends
2 days
uThermal 2v2 Circuit
2 days
BSL
3 days
Sparkling Tuna Cup
3 days
WardiTV Map Contest Tou…
3 days
Ladder Legends
3 days
BSL
4 days
Replay Cast
4 days
Replay Cast
4 days
Wardi Open
4 days
Afreeca Starleague
4 days
Soma vs TBD
Monday Night Weeklies
5 days
Replay Cast
5 days
Afreeca Starleague
5 days
TBD vs YSC
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-04-20
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
WardiTV TLMC #16
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

Escore Tournament S2: W4
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
2026 GSL S1
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.