Search Results

Search found 4580 results on 184 pages for 'faster'.

Page 83/184 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Is C# slower than VB.NET?

    - by Matt Winckler
    Believe it or not, despite the title, this is not a troll. Running some benchmarks this morning, my colleagues and I have discovered some strange things concerning performance, and I am wondering if we're doing something horribly wrong. We started out comparing C# vs. Delphi Prism calculating prime numbers, and found that Prism was about 30% faster. I figured maybe CodeGear did more optimization when generating IL (the exe was about twice as big as C#'s and had all sorts of different IL in it.) So I decided to write a test in VB.NET as well, assuming that Microsoft's compilers would end up writing essentially the same IL for each language. However, the result there was more shocking: C# was more than three times slower than VB running the same operations. The generated IL was different, but not extremely so, and I'm not good enough at reading it to understand the differences. As a fan of C#, this apparent slowness wounds me horribly, and I am left wondering: what in the world is going on here? Is it time to pack it all in and go write web apps in Ruby? ;-) I've included the code for each below--just copy it into a new VB or C# console app, and run. On my machine, VB finds 348513 primes in about 6.36 seconds. C# finds the same number of primes in 21.76 seconds. (I've got an Intel Core2 Quad Q6600 @2.4Ghz; on another Intel machine in the office the code for both runs much faster but the ratio is about the same; on an AMD machine here the timing is ~10 seconds for VB and ~13 for C#--much less difference, but C# is still always slower.) Both of the console applications were compiled in Release mode, but otherwise no project settings were changed from the defaults generated by Visual Studio 2008. Is it a generally-known fact that C#'s generated IL is worse than VB's? Or is this a strange edge case? Or is my code flawed somehow (most likely)? Any insights are appreciated. VB code Imports System.Diagnostics Module Module1 Private temp As List(Of Int32) Private sw As Stopwatch Private totalSeconds As Double Sub Main() serialCalc() End Sub Private Sub serialCalc() temp = New List(Of Int32)() sw = Stopwatch.StartNew() For i As Int32 = 2 To 5000000 testIfPrimeSerial(i) Next sw.Stop() totalSeconds = sw.Elapsed.TotalSeconds Console.WriteLine(String.Format("{0} seconds elapsed.", totalSeconds)) Console.WriteLine(String.Format("{0} primes found.", temp.Count)) Console.ReadKey() End Sub Private Sub testIfPrimeSerial(ByVal suspectPrime As Int32) For i As Int32 = 2 To Math.Sqrt(suspectPrime) If (suspectPrime Mod i = 0) Then Exit Sub End If Next temp.Add(suspectPrime) End Sub End Module C# Code using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace FindPrimesCSharp { class Program { List<Int32> temp = new List<Int32>(); Stopwatch sw; double totalSeconds; static void Main(string[] args) { new Program().serialCalc(); } private void serialCalc() { temp = new List<Int32>(); sw = Stopwatch.StartNew(); for (Int32 i = 2; i <= 5000000; i++) { testIfPrimeSerial(i); } sw.Stop(); totalSeconds = sw.Elapsed.TotalSeconds; Console.WriteLine(string.Format("{0} seconds elapsed.", totalSeconds)); Console.WriteLine(string.Format("{0} primes found.", temp.Count)); Console.ReadKey(); } private void testIfPrimeSerial(Int32 suspectPrime) { for (Int32 i = 2; i <= Math.Sqrt(suspectPrime); i++) { if (suspectPrime % i == 0) return; } temp.Add(suspectPrime); } } }

    Read the article

  • set up pernament ramdisk in ubuntu to not using ram when is the ramdisk empty

    - by robo
    Hi I've got 8GB RAM on my laptop running Ubuntu 12.04. I added following record to /etc/fstab tmpfs /media/ramdisk tmpfs defaults,noatime,mode=1777 0 0 What exactly it means? I have tested that I can save 4GB to ram disk at most. Why exactly 4GB? Where did the computer get this number from? And what happens when I don't use that ram disk for a while and when the directory /media/ramdisk is empty? Does it mean that my system can use whole 8GB ram? And what happens when the system runs out of ram? Will the most rarely used things be moved to swap? And should I turn of swap if I think my system will never need it? Will turning off the swap make my computer faster? And can I even remove the swap partition? And will the hibernation work correctly then?

    Read the article

  • Database OR Array

    - by rezoner
    What is the exact point of using external database system if I have simple relations (95% querries are dependant on ID). I am storing users and their stats. Why would I use external database if I can have neat constructions like: db.users[32] = something Array of 500K users is not that big effort for RAM Pros are: no problematic asynchronity (instant results) easy export/import dealing with database like with a native object LITERALLY ps. and considerations: Would it be faster or slower to do collection[3] than db.query("select ... I am going to store it as a file/s There is only ONE application/process accessing this data, and the code is executed line by line - please don't elaborate about locking. Please don't answer with database propositions but why to use external DB over native array/object - I have experience in a few databases - that's not the case. What I am building is a client/gateway/server(s) game. Gateway deals with all users data, processing, authenticating, writing statistics e.t.c No other part of software needs to access directly to this data/database.

    Read the article

  • WEP key not working on laptop running Ubuntu

    - by stupid-idiot
    I can't connect to my router via wifi from my laptop (running Ubuntu) even if I'm 100% sure the WEP key I punch in is correct. It works via LAN though. I'm also not able to ping localhost 127.0.0.1. I had some problems setting up the radio on my network card but I think that that works since it finds some wireless networks. (Although it's much much faster than Windows it's useless since I can't download any libraries for development.) What could be wrong with my setup?

    Read the article

  • Reimage PC: Myth or Fact to speeding up a slow PC?

    - by sunpech
    I have a 4-5 year old PC running Windows XP for software development at work. It struggles to run all development tools I need at the same time. Management feels I need to reimage my computer to "speed it up". The last time it was imaged was about 3 years ago. What resources books, websites, blogs, articles, etc are out there that supports/debunks this well known belief that reimaging an old PC running Windows XP will make it faster once again? A resource I remember reading is from Lifehacker.com: Windows Maintenance Tips: The Good, Bad And Useless

    Read the article

  • Database server: Small quick RAM or large slow RAM?

    - by Josh Smeaton
    We are currently designing our new database servers, and have come up with a trade off I'm not entirely sure of how to answer. These are our options: 48GB 1333MHz, or 96GB 1066MHz. My thinking is that RAM should be plentiful for a Database Server (we have plenty and plenty of data, and some very large queries) rather than as quick as it could be. Apparently we can't get 16GB chips at 1333MHz, hence the choices above. So, should we get lots of slower RAM, or less faster RAM? Extra Info: Number of DIMM Slots Available: 6 Servers: Dell Blades CPU: 6 core (only single socket due to Oracle licensing).

    Read the article

  • Burned white shadow on 24inch monitor

    - by elias94xx
    So I got this brand new monitor today an noticed the following problem: This happens while I'm moving my browser window for example. It's not font related, it also happens with icons as you can see on the picture. It's only persistend while I'm moving something, the faster I move it, the farther away is the shadow from the origin. I tested it on windows, linux and two different systems with DVI and VGA. Is this a known issue ? Specifications: Name: Acer S242HLCBID 1920x1080 @ 60hz 2ms response time contrast: 100.000.000:1 manufacture date: week 48 2011 LED backlights

    Read the article

  • Which hosting will let me execute my own EXE with PHP?

    - by guitar-
    I have a task that PHP (or any server-side scripting language) isn't practical for. It involves a lot of file I/O, processing, etc. and it will execute a lot faster using the program I made in C instead of PHP. Do any hosts allow you to upload your own EXE files and run them on the server using PHP's exec, shell_exec, etc. functions? Do you need a dedicated server to do this? Also, I don't know if Facebook's PHP HipHop is out yet, but I really don't want to use that.

    Read the article

  • Optimizing PHP<>MySQL performance

    - by BarsMonster
    I am trying to optimize my PHP<MySQL on this test script: <? for($i=0;$i<100;$i++)//Itterations count $res.= var_dump(loadRow("select body_ru from articles where id>$i*50 limit 100")); print_r($res); ?> I have APC, and article table have an index on id. Also, all these queries are hitting query cache, so sole MySQL performance if great. But when I am using ab -c 10 -t 10 to bench this scipt, I am getting: 100 itterations: ~100req/sec (~10'000 MySQL queries per second) 5 itteration: ~200req/sec 1 itteration: ~380req/sec 0 itteration: ~580req/sec I've tried to disable persistent connections in PHP - it made it slower a bit. So, how can I make it work faster, provided that MySQL is not limiting performance here?

    Read the article

  • Update to Windows 8.1 without using Windows Store

    - by Hari
    I am currently using Windows 8 on my desktop PC. I want to upgrade to Windows 8.1. I heard that Microsoft provides this update through Microsoft Store for free. But in My home I don't have a faster internet connection. I downloaded a Windows 8.1 ISO from cafe, but when I started installing, it asks for a key. I typed my original Key for windows 8, but it didn't work. Is there any way for me to update to Windows 8.1 without an internet connection and without purchasing another key? Thank you

    Read the article

  • What's the quickest way to install Windows 7?

    - by SaultDon
    I am wondering what the quickest/fastest way to install Windows 7 would be? I've read that you can make a bootable USB with unetbootin, or load the ISO contents to a separate partition/hard-drive and boot from there to install. Then I seen a method using imagex to copy the files needed onto a new partition which can be booted from directly, it takes ~7 minutes + ~5 min for the initial boot... I haven't tried it yet but would like to know if anyone knows of anything faster? If you could provide some instructions (step by step) would be great! The imagex method provides a good tutorial for example.

    Read the article

  • Failures when copying between two external drives on the same controller

    - by Krzysztof Kosinski
    I'm encountering a weird problem which is present both on Ubuntu 9.10 and 10.04, on two different machines. When trying to copy between two external drives connected to the same USB controller, the transfer will randomly hang at some random time (after copying 300MB, 1GB, 10GB - it doesn't appear to depend on the dataset being copied). The hang appears to happen faster in 10.04. It appears to happen slower if both drives are connected to a hub. If the drives are connected to 2 distinct physical ports on the machine, the hang will be very fast. Hangs cannot be reproduced if: Data is copied from the first external drive to an internal drive, then to the second external drive Drives are connected to different USB controllers, for example the first one is connected to the built-in controller and the second one via an external PCMCIA controller. lspci says the first machine has an Intel ICH9 USB controller, the second an Intel ICH4. Is this a hardware problem, a kernel problem or a software issue? I used Nautilus when copying the files.

    Read the article

  • Moving my bcd from HDD to SSD - Windows 7

    - by lelouch
    I have windows 7 installed on my SSD, but the /boot/ and bootmgr are on my hard-drive. I want to move them to my SSD for faster booting times. So i figured that I can fix the problem using the Windows startup repair tool. I made a bootable windows 7 flash drive, and ran Windows startup repair. However, it exits with an error. I also can't see my OS in the list of installed OSs. I then tried fixing via the command prompt with bootrec /fixmbr, bootrec /fixboot, bootrec /rebuildbcd. Bootrec /rebuildbcd finds the OS, but gives me the error "The requested system device cannot be found" when i try fixing it. Does anyone know why this is failing? I read somewhere that the Windows Repair environment doesn't support a flash drive, which is why I'm getting that error. Is this true? Unforunately my dvd drive is playing up so I can't use it to test this.

    Read the article

  • Can Resource Governor for SQL Server 2008 be scripted?

    - by blueberryfields
    I'm looking for a method to, in real-time, automatically, adjust Resource Governor settings. Here's an example: Imagine that I have 10 applications, each hitting a different database on the same database machine. For normal operations, they do not hit the database very hard, so I might want each one to have 10% CPU power reserved. Occasionally, though, one or two of them might spike, and run an operation which could really use the extra power to run faster. I'd like to be able to adjust to compensate (say, reducing the non-spiking apps to 3%, and splitting the difference between the spiking apps). This is a kind of poor man's method of trying to dynamically adjust resource allocation and priorities. Scripts (or something script-like) is preferred, since the requirement is for meta-level adjustments to be possible in real-time, also.

    Read the article

  • Why does a website server recieve local files much slower than recieve files on other websites?

    - by T...
    The server at http://any2djvu.djvuzone.org receives same files from local computers much slower than from links on other websites (with the same files have been uploaded to the other websites, such as dropbox.com). The speed of uploading a file from local computers to other websites such as dropbox is also much faster than to any2djvu website. For example, a pdf file of 17MB needs more than 1 min to be uploaded to any2djvu server from a local computer with normal ISP such as Comcast High-speed internet, but takes less than 3 seconds from a dropbox link to any2djvu server, and takes around 10 seconds from the same local computer to dropbox. I wonder why there is such big differences for the speeds of different uploading ways to a web server? Thanks!

    Read the article

  • Freebsd or Linux? as BGP router over 100mbps

    - by Yucong Sun
    I am building a server to act as a BGP border router for my 100mbps uplink in ISP. I needs these feature: 1) Dual stack BGP peering/routing (at least 100Mbps, maybe more). 2) Potential full internet BGP feed. 3) Some basic ACL functionality. The hardware is L3426/8G ram. NIC will be on-board dual port Broadcom 5716. I've worked with Linux extensively before and it seems to be able to handle 100mbps, but I heard FreeBSD is faster on networking stuff. Which one should I use? And do we have some performance benchmark numbers out there? Cheers.

    Read the article

  • Proper way for changing MAC address in a linux VM?

    - by HappyDeveloper
    I tried to change the MAC address in a ubuntu VM (virtualbox), but after that it threw lots of errors during boot, and then I had no internet connection. Then I saw that the interface was renamed to eth1, so I edited /etc/network/interfaces to change eth0 to eth1, rebooted (didn't know how to restart the network), and boot was now faster and internet worked fine. But now after every time I log in, I get 1 or 2 error messages that say nothing, they only ask me if I want to report them. So I was wondering, is there was a proper way to change MAC address, to avoid these issues?

    Read the article

  • Alternatives for heapdumps creation with higher performance than jmap?

    - by Christian
    Hi, I have to create heapdumps, which works nice with jmap. My problem is, that jmap takes very long to create the heapdump file. Especially when the heap is getting bigger ( 1GB) it is taking too long. One situation as example: When the server gets into trouble with the heapspace, I want to restart it automatically and create a heapdump before the restart. This works, but takes too long to write the heapdump. This way the server is down for too long. The heapdump creation takes longer than one hour. I know about -XX:+HeapDumpOnOutOfMemoryError, but most of the time I can find the memory problem before the exception is thrown by the jvm. Is there an alternative to jmap which writes the heapdumps faster? A special solution for the example above would also be appreciated. This question is a mix between programming and system-administration, but I think I'm at the right place here.

    Read the article

  • Slow old notebook Hardy => Karmic

    - by Mailo
    Hi, i have one very slow notebook from year about 2000. On the computer is running icewm with firefox (in this times chromium for testing). My question is if it's good step to upgrade the system to Karmic Koala? I can't install another OS on that. It doesn't have CD-ROM, it can't boot from flash, or network. The new wanted state is little bit faster system for browsing web and copying photos to local NAS. I don't mention hardware configuration, becouse it's real speed is really deep below the paper parameters.

    Read the article

  • Ngingx wont start with fastcgi_split_path_info" error

    - by Ke
    Hi, I heard that nginx is faster and since im on a VPS with low ram i thought id try it out. I got through this tutorial http://www.howtoforge.com/installing-php-5.3-nginx-and-php-fpm-on-ubuntu-debian But I now get the following error: unknown directive "fastcgi_split_path_info" in /etc/nginx/sites-enabled/default:28 Anyone know what might be causing the problem? I cant find any reference to the problem on Google Also I have heard conflicting things about Nginx vs Apache. Some say use one, some say the other. Im using allsorts such as rewrite rules, proxies etc. Am I setting myself up for a fall by using Nginx? If I go for apache, does anyone know of anyway to tweak it so that it performs better on a low ram VPS? Cheers Ke

    Read the article

  • Ngingx wont start with fastcgi_split_path_info" error

    - by Ke
    Hi, I heard that nginx is faster and since im on a VPS with low ram i thought id try it out. I got through this tutorial http://www.howtoforge.com/installing-php-5.3-nginx-and-php-fpm-on-ubuntu-debian But I now get the following error: unknown directive "fastcgi_split_path_info" in /etc/nginx/sites-enabled/default:28 Anyone know what might be causing the problem? I cant find any reference to the problem on Google Also I have heard conflicting things about Nginx vs Apache. Some say use one, some say the other. Im using allsorts such as rewrite rules, proxies etc. Am I setting myself up for a fall by using Nginx? If I go for apache, does anyone know of anyway to tweak it so that it performs better on a low ram VPS? Cheers Ke

    Read the article

  • rm on a directory with millions of files

    - by BMDan
    Background: physical server, about two years old, 7200-RPM SATA drives connected to a 3Ware RAID card, ext3 FS mounted noatime and data=ordered, not under crazy load, kernel 2.6.18-92.1.22.el5, uptime 545 days. Directory doesn't contain any subdirectories, just millions of small (~100 byte) files, with some larger (a few KB) ones. We have a server that has gone a bit cuckoo over the course of the last few months, but we only noticed it the other day when it started being unable to write to a directory due to it containing too many files. Specifically, it started throwing this error in /var/log/messages: ext3_dx_add_entry: Directory index full! The disk in question has plenty of inodes remaining: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda3 60719104 3465660 57253444 6% / So I'm guessing that means we hit the limit of how many entries can be in the directory file itself. No idea how many files that would be, but it can't be more, as you can see, than three million or so. Not that that's good, mind you! But that's part one of my question: exactly what is that upper limit? Is it tunable? Before I get yelled at--I want to tune it down; this enormous directory caused all sorts of issues. Anyway, we tracked down the issue in the code that was generating all of those files, and we've corrected it. Now I'm stuck with deleting the directory. A few options here: rm -rf (dir)I tried this first. I gave up and killed it after it had run for a day and a half without any discernible impact. unlink(2) on the directory: Definitely worth consideration, but the question is whether it'd be faster to delete the files inside the directory via fsck than to delete via unlink(2). That is, one way or another, I've got to mark those inodes as unused. This assumes, of course, that I can tell fsck not to drop entries to the files in /lost+found; otherwise, I've just moved my problem. In addition to all the other concerns, after reading about this a bit more, it turns out I'd probably have to call some internal FS functions, as none of the unlink(2) variants I can find would allow me to just blithely delete a directory with entries in it. Pooh. while [ true ]; do ls -Uf | head -n 10000 | xargs rm -f 2/dev/null; done ) This is actually the shortened version; the real one I'm running, which just adds some progress-reporting and a clean stop when we run out of files to delete, is: export i=0; time ( while [ true ]; do ls -Uf | head -n 3 | grep -qF '.png' || break; ls -Uf | head -n 10000 | xargs rm -f 2/dev/null; export i=$(($i+10000)); echo "$i..."; done ) This seems to be working rather well. As I write this, it's deleted 260,000 files in the past thirty minutes or so. Now, for the questions: As mentioned above, is the per-directory entry limit tunable? Why did it take "real 7m9.561s / user 0m0.001s / sys 0m0.001s" to delete a single file which was the first one in the list returned by "ls -U", and it took perhaps ten minutes to delete the first 10,000 entries with the command in #3, but now it's hauling along quite happily? For that matter, it deleted 260,000 in about thirty minutes, but it's now taken another fifteen minutes to delete 60,000 more. Why the huge swings in speed? Is there a better way to do this sort of thing? Not store millions of files in a directory; I know that's silly, and it wouldn't have happened on my watch. Googling the problem and looking through SF and SO offers a lot of variations on "find" that obviously have the wrong idea; it's not going to be faster than my approach for several self-evident reasons. But does the delete-via-fsck idea have any legs? Or something else entirely? I'm eager to hear out-of-the-box (or inside-the-not-well-known-box) thinking. Thanks for reading the small novel; feel free to ask questions and I'll be sure to respond. I'll also update the question with the final number of files and how long the delete script ran once I have that. Final script output!: 2970000... 2980000... 2990000... 3000000... 3010000... real 253m59.331s user 0m6.061s sys 5m4.019s So, three million files deleted in a bit over four hours.

    Read the article

  • DNS server at router level vs. computer level

    - by Craig
    I've three questions. Is it better/faster/optimal to set up your server's preferred and alternate DNS servers in your OS's network settings or in your router settings? Will it cause problems if it is set up in both places, both pointing to the same IPs? I am running Windows and I have my network assign a static IP to one of my computers. This doesn't allow me to obtain the DNS server addresses from my router automatically. Is there an IP I can put in that will cause it to take the DNS server addresses from the router?

    Read the article

  • windows server 2008 vs ubuntu 11 [closed]

    - by user472875
    I am working on implementing a custom server application that should be capable of handling a very large volume of traffic. I am aware that this type of question has been asked a lot, but I haven't been able to find a good answer. What I'm really looking for is for a server with given specs which OS will be able to handle a larger traffic faster and more reliably. I do not care about rights management or any other features. I am fairly good with both platforms, and so I would like to pick the OS with better performance on a clean install, and with nothing else running. Thanks in advance.

    Read the article

  • Ngingx won't start with fastcgi_split_path_info" error

    - by Ke
    I heard that nginx is faster and since I'm on a VPS with low RAM I thought I would try it out. I got through this tutorial http://www.howtoforge.com/installing-php-5.3-nginx-and-php-fpm-on-ubuntu-debian But I now get the following error: unknown directive "fastcgi_split_path_info" in /etc/nginx/sites-enabled/default:28 What might be causing the problem? I can't find any reference to the problem on Google. Also I have heard conflicting things about nginx vs Apache. Some say use one, some say the other. I'm using all sorts of things such as rewrite rules, proxies etc. Am I setting myself up for a fall by using nginx? If I go for Apache: how can I tweak it so that it performs better on a low RAM VPS?

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >