DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
11 Monitoring and Observability Tools for 2023
Learn more
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. New MacBook Air Beats M1 Max for Java Development

New MacBook Air Beats M1 Max for Java Development

In a shocking development, a new computer is faster than an old one. In this case, the new thin Air beats a newish thicker M1 Max top-of-the-line machine.

Shai Almog user avatar by
Shai Almog
CORE ·
Dec. 22, 22 · Review
Like (4)
Save
Tweet
Share
10.48K Views

Join the DZone community and get the full member experience.

Join For Free

This is a shocker…I just switched laptops, and I thought I was downgrading from the “top of the line” M1 Max with 64 GB (14.1-inch version) to a “tiny” MacBook Air M2 with “only” 24gb of RAM. Turns out I was wrong. The new M2 seems to be noticeably faster for my use cases as a Java developer. I was at first shocked, but in retrospect, I guess this makes sense.

I recently left my job at Lightrun. I usually buy my own laptops, as I don’t enjoy constantly switching devices when I’m at work or working on personal things. But since I worked at Lightrun for so long, I accepted their offer for a laptop. One year after I got the new laptop, I found myself leaving the company. So arguably, this should have been a big mistake. Turns out it wasn’t.

I wanted to buy the same machine. I was very pleased with the M1 Max. It’s powerful, fast, light, and has a battery that lasts forever. It runs cool and looks cool. I placed an order with a local vendor who had the worst possible service. I ended up canceling that. Then I started looking around.

I initially dismissed the MacBook Airs. I had a couple of MacBook Airs in the past, and they were good for some things. But I do a lot of video editing nowadays, and I also can’t stand their sharp edges. They are uncomfortable to hold in some situations. The new MacBook Airs finally increased the RAM. Not to 32 GB as I’d have wanted, but 24 GB is already a vast improvement over the minuscule 16 GB of older devices. They also come in black and cost much less than the equivalent pro. MacBook Airs are lighter and thinner. I’m very mobile, both because I travel and because I work everywhere. For me, the thin and light device is a tremendous advantage. You can check out the comparison tool on Apple's website.

They do have two big disadvantages:

  • No HDMI port— that sucks a bit. It was nice plugging in at conferences with no dongle. But it’s not something I do often, and AirPlay works for most other use cases.
  • Only one external monitor — I don’t use external monitors when I work, so this wasn’t a problem for me. If you’re the type that needs two monitors for work, then this isn’t the laptop for you.

Since both aren’t an issue for me and the other benefits are great. I saved some money and bought the Air. I expected to take a performance hit. Turns out I got a major performance boost!

Migration

I used Time Machine to back up my older Mac and restore it to the new Mac. In terms of installed software and settings, both devices should be identical. The stuff that is running on the old machine should be on the new machine as well. Including all the legacy that might be slowing it down. However, I wouldn’t consider my findings as scientific as this isn’t a clean environment. Everything is based on my use cases. Professional sites have better benchmarks for common use cases. I suggest referring to them for a more complete picture.

However, for me, the machine is MUCH better. Probably most glaring is the IDE startup. I use IntelliJ/IDEA Ultimate for most of my day-to-day work. I just started writing a new book after completing my latest book (which you can preorder now), and for that purpose, I installed a fresh version of IntelliJ Community Edition. It doesn’t include all the plugins and setup in my typical install. It’s the perfect environment to check IDE startup time. Notice that I measured this with a stopwatch app, not ideal. I started the stopwatch with the icon click and stopped when the IDE fully loaded the Codename One project.

  • MBP M1 Max 64 GB - 6.30
  • MBA M2 24 GB - 4.54

This is a sizeable gap in performance, and it’s consistent with these types of IO-bound operations. Running mvn package on the Codename One project for both showed slightly lower but still consistent improvements. I ran this multiple times to make sure:

  • MBP M1 Max 64 GB - 20.211
  • MBA M2 24 GB - 18.346

These are not medians or averages, just the output of one specific execution. But I ran the build repeatedly, and the numbers were consistent with a rough 2-second advantage to the M2. Notice I used the ARM build of the JDK and not the x86 versions.

As part of my work, I also create media and presentations. I work a lot in keynote and export content from it. The next obvious test is to export a small presentation I made to both PDF and a movie. In the PDF export, I made both exports for all the stages of the build.

  • MBP M1 Max 64 GB - 2.8
  • MBA M2 24 GB - 2.13

Again this shows a healthy advantage to the M2 device. But here’s the twist, when exporting to a movie, the benchmark flipped completely, and the MBP wiped the floor with the MBA.

  • MBP M1 Max 64 GB - 26.8
  • MBA M2 24 GB - 39.59

Explanation

In retrospect, these numbers shouldn’t have surprised me. The M2 would be faster for these sorts of loads. IO would be faster. The only point where the M1 would gain an advantage would be if the 24 GB of the Air would be depleted. This isn’t likely for the current test, so the air wins.

Where the Air loss is in GPU-bound work. I’m assuming the movie export code does all the encoding on the GPU, which is huge and powerful on the M1 Max. I hope this won't be a problem for my video editing work, but I guess I’ll manage with what I have.

Even though the device is smaller by one inch only, the size difference is hard to get used to at this point. I worked on a MacBook Air in the past, so I’m sure this will pass as I get used to it. It’s a process. I’m thrilled with my decision, and the black device is such a refreshing feeling after all of those silver and gray Macs. The power brick is also much smaller, which is one of those details that matter so much to frequent travelers.

Why Am I Using a Mac?

This might be the obvious question. I don’t use an iPhone, so I might as well get a Linux laptop like a good hacker. I still develop things on Codename One; here, I occasionally need a Mac for iOS-related work. It’s not as often, but it happens. The second reason is that I’m pretty used to it by now. The desktop on Linux still feels not as productive to me.

There is one reason I considered going back to Linux, and that’s docker. I love the M1/2 chips. They are fantastic. Unfortunately, many docker images are Intel only, and that’s pretty hard to work with when setting up anything sophisticated. The problem is solving itself as ARM machines gain traction. But we aren’t there yet.

Finally

Yes, I know. This article is shocking: a newer machine is faster than an older machine. But keep in mind that the M1 was top of the line in all regards, and the Air has half the performance cores. It's much thinner, fanless, and around 30% lighter. That's amazing over a single-generation update.

Amazingly I think the M2 is powerful enough in a MacBook Air for most people. I think I would pick it even if the M1 Max was at the same price point. It’s better looking. It’s lighter. Most of the things that matter to me perform better on the Air. It’s small but not too small, and the screen is pretty great. I can live with all of those. It doesn’t have that weird MBA sharp edge older versions have. It’s a great machine. Hopefully, I’ll feel the same way when the honeymoon period is over, so if you’re reading this in 2023, feel free to comment/ping me, I might have additional insights.

The one point I’m conflicted about is stickers. The black finish is so pretty. But I want stickers. I had such a hard time removing them from the M1 machine. It’s too soon…

Machine Java (programming language) MacBook (Retina) Apple iOS Design review

Published at DZone with permission of Shai Almog, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 5 Common Firewall Misconfigurations and How to Address Them
  • Building a RESTful API With AWS Lambda and Express
  • An End-to-End Guide to Vue.js Testing
  • How To Use Java Event Listeners in Selenium WebDriver

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: