LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-23-2014, 03:09 PM   #1
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Rep: Reputation: 6
Question Native CFLAGS - core2duo and core i3 - compatible?


Hi,

If I compiled plenty of 64bit software using the following CFLAGS on a Core2 Duo E6400 :
Code:
-mtune=native -march=native -O2 -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize
and then I put my system on a Core-i3,
  1. Will it run?
  2. Will it still be as optimized as if I recompile everything again with those CFLAGS?
  3. If not for the above 2 questions, is there any new pretty good CPU that would be totally compatible?

Thanks!
 
Old 10-23-2014, 03:36 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
1) It probably will.
2) Maybe, you'll have to test it. The Core2 doesn't have AVX. However, AVX is not guaranteed to improve performance.

Last edited by metaschima; 10-23-2014 at 03:38 PM.
 
Old 10-25-2014, 02:25 AM   #3
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Original Poster
Rep: Reputation: 6
Thank you for the answer.

probably/maybe ... hmmmm?
 
Old 10-25-2014, 11:26 AM   #4
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
1) 99 % chance of running
2) 70 % chance of it being somewhat slower that it would be with native compile, but it depends on too many factors to tell. You realize the compiler you use matters, and its version matters. Each compiler version does slightly different things when transforming C code into assembly. The more information you provide the more accurate I can be.

What exact core i3 are you looking at ?

What kind of code is this ? Graphics ? Highly vectorizable ?

I can only be as sure as the info you give me.

Last edited by metaschima; 10-25-2014 at 11:28 AM.
 
Old 10-25-2014, 11:40 AM   #5
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Original Poster
Rep: Reputation: 6
Ok

i3 4150 Haswell, versus core2 duo e8500.

The whole system will be the same: a Slackware64 14.1 with 3.14.12-rt9 kernel that I will recompile anyway.
No graphics, no X (everything will be X forwarded)

I compiled so many things that I can't really tell... including gcc which I can make again it's fine, but it's mostly audio libraries and programs that I'm concerned about.
The system is mostly focused on Ardour / Jack, so I will recompile these 2, but what about all the libraries they need?

The system will be really loaded so if I can gain a 5% performance increase w/ something I just have to do it.

Thanks.
 
Old 10-25-2014, 12:08 PM   #6
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Everything should work as is, except if it is a custom kernel, in which case you want to compile it for the new architecture.

If the system is really loaded you're definitely want to recompile things. You should recompile glibc, glib, glib2, as well as all the libraries that the audio programs use and the programs themselves.

You should really test the critical slowest routines with different compile options and see which are best. Forcing gcc to vectorize is not the best idea because it can actually slow things down.
 
Old 10-25-2014, 12:11 PM   #7
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Original Poster
Rep: Reputation: 6
Ah ok, will do that then.
Thank you
 
  


Reply

Tags
cflags, cpu, gcc, intel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is ROCK compatible with Core i5 ? Choya ROCK 3 04-12-2012 08:56 PM
cpu frequency is divided between two core of core2duo or dualcore or intel atom HT bluepenguine Linux - Newbie 3 06-09-2009 02:45 AM
Intel core2duo vs.amd opteron dual core marcia Linux - Hardware 3 02-03-2007 03:10 PM
Where to change CFLAGS in Fedora Core 2? black hole sun Fedora 3 09-26-2004 06:17 PM
Wireless device compatible with Fedora Core 1? cucolin@ Linux - Wireless Networking 3 09-04-2004 02:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration